Error 502

Hello!

I’m experiencing an Error 502: Bad Gateway when I do a search in the filters panel, but it just happened in particular examples.

I have a filter that is Resumen metadata; it contains a very large text, and when I use it, it can search and find the item, but when I do click on it, this mistake appears.

Another anomaly is that just happened when the text is so large, when it’s small, it can open the item. (It just happened in the filters panel, when I search the same item in the search widget from wp with the same words, it can do it)

Another curiosity is that it just happened in external redes. I do similar exercises on my intranet, and the mistake doesn’t appear. Just when I do from an external red.

I checked Site health from wp, tainacan system check and all it’s ok.
Logs from apache tell this:

[Wed Jan 22 10:57:50.936271 2025] [proxy_fcgi:error] [pid 1324516] (22)Invalid argument: [client 156.20.1.25:59000] AH01075: Error dispatching request to : , referer: https://wpdomain.com>[Wed Jan 22 10:58:12.289091 2025] [proxy_fcgi:error] [pid 1324513] [client 156.20.1.25:59765] Premature end of script headers: index.php, referer: https://wpdomain.comb.mx/programas/?perp>[Wed Jan 22 10:58:12.289166 2025] [proxy_fcgi:error] [pid 1324513] [client 156.20.1.25:59765] AH01070: Error parsing script headers, referer: https://wpdomain.comb.mx/programas/?perpage=1>[Wed Jan 22 10:58:12.289184 2025] [proxy_fcgi:error] [pid 1324513] (22)Invalid argument: [client 156.20.1.25:59765] AH01075: Error dispatching request to : , referer: https://wpdomain.com>

I think it could be a server conf mistake…
As a comment, Module proxy_fcgi is enabled

Versions:
Latest version tainacan
Php 8.2-fpm

Have you ever experienced this problem?
Regards!!

UPDATE:

I discovered that the mistake was linked to the web server as I suspected. I didn’t know that there was a default value in the URL when making requests to the server when going through the proxy.
And well, as I told you when I did the search in the filter because when I click on the item, it retrieves absolutely all of this in the URL, exceeding the default value set by Apache, this is:

LimitRequestFieldSize

In case you ever experience this problem.
For the moment I prefer not to move those values and just make the filter private.

Supporting material:
https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestfieldsize

Hi @erickml, I’m sorry for the late response, but glad that you figured out the cause of the error.

It does makes sense, when you apply a filter, the URL must be filled with the requested value and that long text is being passed to the request headers. It is not a very common use case (to have a filter for textarea fields)… I would prefer using textual or advanced search for them. But again, if it wasn’t a valid use case we shouldn’t even allow it. Maybe we should come up with some strategy to pass a hash instead of the plain value to perform that search but that can be quite complex to build in a performant way. I’ll discuss this problem with my colleague to see if we can think of a nice solution to open a dedicated issue.

1 curtida