Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

davidalavely's avatar

502 Error when I include a UTM parameter

My marketing group is using the Hubspot and passing three parameters in the querystring, I get a 502 error.

They are trying to pass: utm_source utm_medium utm_campaign

I can pass any combiniation of the three params, but not all three.

Any help would be appreciated.

0 likes
10 replies
Tray2's avatar

How are you passing them?

?utm_source=""&utm_medium=""&utm_campaign=""

This is how I create links with query string in one of my projects.

<a href="{{ route('index', array_merge(request()->query(), ['artist' => $record->artist_id])) }}">Link</a>
1 like
Tray2's avatar

@davidalavely I don't see anything wrong with that querystring, how do you handle it serverside?

davidalavely's avatar

@Tray2 Not doing anything out of the ordinary. I didn't set up the server, so the best i can see is I take the query, and process it to the tags.

But when I pass all three, it bombs.

Any thoughts on where to look, either in the server or Forge to see the settings?

Tray2's avatar

@davidalavely How long does that query string become?

I also suggest taking a look in the logs, and I'm guessing you will find something like

[error] 244#0: *11721 upstream sent too big header while reading response header from upstream

davidalavely's avatar

@Tray2 thank you, I am working on getting to the logs, It takes a few seconds prior to erroring, maybe 3 to 4

davidalavely's avatar

@Tray2 You were correct, I was able to locate that error and implement a fix. Thanks for the assist.

1 like

Please or to participate in this conversation.