• Resolved Guz

    (@gustavowiesner)


    Hi @mihche, how are you?
    I recently installed your plugin on my web, and when logging in and checking the captcha, a 502 Bad Gateway error occurs.
    I hope you can solve it as soon as possible.
    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author MihChe

    (@mihche)

    Hi @gustavowiesner,
    Is this happening when you post the form? If this is the case, the 502 Bad Gateway error tells me something else. Are you using NGINX somehow – as web server or proxy?

    ~Mihai

    Thread Starter Guz

    (@gustavowiesner)

    It happens when I try to start the session, checking the captcha happens the error that the mentioned.

    Plugin Author MihChe

    (@mihche)

    What do you mean by starting the session?

    So… Google shows the captcha challenge and when you click “Verify” you are getting the 502 Bad Gateway error, right?

    Are you using NGINX?

    ~Mihai

    Hi @mihche,

    I have the same issue! 502 Bad Gateway error when push the send button.
    Yes, my web server is nginx
    Any clue?

    Thanks

    Hi @mihche,
    Just a quick update. I’ve tested the plugin on a site were I am running Apache and everything works perfect. No errors at all. Any idea what can be wrong when nginx is used?
    Thanks

    Plugin Author MihChe

    (@mihche)

    Hey Patrick,

    Thanks for your update. As I expected, yes, this can happen on NGINX servers and I was able to replicate this on one of my servers.

    When the form get submitted, the reCaptcha token is submitted to the server as well. Which makes sense, because it should be verified on the server side. Sometimes, especially when Google shows the challenge, the encrypted token is extremely long and when NGINX receives such request it will reject it. This causes 502 Bad Gateway error.

    All you have to do is to increase the values of client_body_buffer_size and client_max_body_size directives in nginx.conf.

    This is what works for me, but as I mentioned, the values can differ from site to site
    client_body_buffer_size 16K;
    client_max_body_size 16K;

    If FastCGI is enabled you can also increase the values of fastcgi_buffers and fastcgi_buffer_size directives

    My values are:

    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;

    Please let me know!

    Cheers,
    ~Mihai

    Hi mihche,
    Thank you very much for this. Works perfect after I changed client_body_buffer_size and client_max_body_size to 16K as you suggested.

    Happy Holidays!

    Plugin Author MihChe

    (@mihche)

    Hi,
    Glad to hear it worked for you. Thanks for letting me know.

    Happy Holidays!

    ~Mihai

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error 502: Bad Gateway’ is closed to new replies.