Laravel 8 passport token behind load balancer 2 droplet not work

Hi iam new for load balancer, i am trying to setup first one is just one droplet behind the load balancer, it work good, i using laravel 8 passport token for this…but after i clone the droplet and make it 2 droplet between load balancer, it start not working like “upstream timeout”

i already enabled the sticky session on load balancer, but the odd one if i remove the droplet so just left one, it start good again no “upsteream timeout” error on nginx error.log…

so i am thinking this is because might be the server not response…i use laravel as the api services with token bearer …so i am thinking this is because of 2 droplets behind load balancer that might be when login go to one server and when request to another server? so the token problem? but i already enable the sticky session? hmm have any idea? thank you so much before this has been a week to find the solution, and is it possible becaus CORS also? hmm i dont see something like that error…thank you again!

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.


What is the full error that you get? Also, do you see any errors in your Laravel log besides the Nginx log.

Usually, this could be a problem if your Passport public and private keys do not match on the two servers I believe, as well as your APP_KEY defined in your .env file. Can you confirm that this is not the case?

On another note, if you access the Droplets directly, does it work as expected?