Question

Load Balancer with certificate in Forwarding rules return 504 gateway timeout at minute

Hi.

I have a legacy application in php 5.6, with the runtime at 3,600.

To give it greater availability, a new server was configured and a DO load balancer was used, this generated the problem that when changing the server, the user’s session is closed, to fix it, Sticky sessions were activated, but this forced me to add the SSL certificate. in Forwarding rules.

However, this started generating timeout with processes of more than 1 minute, I have done several tests and when I use Passthrought in Forwarding rules it allows processes of up to 5 minutes without generating timeout.

At this time I must choose between the user logout every time the server changes or processes fall for more than a minute. Is there a way to modify the timeout of the balancer when using SSL certificate?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there @oscarricardosan,

I believe that it is not possible to change the timeout of the Loadbalancer.

What I could suggest instead is using a caching solution like Redis or Memcache to store your PHP sessions in.

You can take a look at this tutorial on how to setup a Redis server as a session handler for PHP on Ubuntu:

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-redis-server-as-a-session-handler-for-php-on-ubuntu-14-04

Hope that this helps! Regards, Bobby