Have you tried a restart of your server?
502 Bad Gateway
I've been using forge servers to test my development sites and have woke up to a 502 Bad Gateway to all my sites. I haven't messes around on the server/command line once. Just linked my github account and added a few environment variables. I started using forge because I wanted something that would just work out of the box and I wouldn't have to worry about dealing with these problems.
Could anybody give me a clue as to why this could have happened.
Thanks
Yeah, just done that. No Joy.
No idea if this will help, or not - worth checking out though; http://www.nginxtips.com/502-bad-gateway-using-nginx/
Assuming Forge set up your server and used Nginx anyway.
Hi @robgoodliffe,
See here if you need more information:
http://laravel.io/forum/05-14-2014-502-bad-gateway-in-vagrant-permission-denied
Hope it helps you.
Thanks for the links chaps. Much appreciated. I haven't personally updated anything on forge, but I'll have a dig around on the forge server. This is exactly what i didn't want to do with forge, I just needed it to work.
OK, my bad. It was simply a case of running out of disk space on the server. A quick upgrade and the problem is solved.
Having the same problem here... rebooting had no effect. There's plenty of space on the server -- it's totally new.
I'm seeing the following in my nginx error logs:
2014/10/27 16:07:24 [error] 1489#0: *2 connect() failed (111: Connection refused) while
connecting to upstream, client: 64.145.76.159, server: myserver.com, request: "GET
/index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "myserver.com"
I'm really confused on how Forge is setting up the server instance. What's missing here? This is all new, and nothing works out of the box.... the deploy script tried to access directories that didn't exist, and the config here seems like it's referencing things somewhere that aren't correct.
Anyone have ideas?
Same here :(
I had this problem today where my laravel installation was working, but all other sites returned 502 Bad Gateway.
I restarted the server, didn't fix the problem.
I restarted nginx manually: sudo /etc/init.d/nginx restart didn't work
I restarted php5-fpm manuall: sudo /etc/init.d/php5-fpm restart didn't work
Then I restarted hhvm: sudo /etc/init.d/hhvm restart It worked.
Not sure why this was having a problem. It was working like a champ for quite a while. I hope this helps anyone that is having this odd issue.
This worked for me: sudo service php7.0-fpm restart
@[email protected] Thanks, I was struggled with this "502 Bad Gateway" in my nginx sever. I solved this problem by reading the article you posted. I was run this command:
sudo apt install php-fpm
sudo systemctl restart nginx
Sever was running well.
I just restarted everything:
- Server
- php
- mysql
- nginx
I pushed something and i didn't get any 502 error anymore
This happened to me just now. Rebooting nginx didn't work. Rebooting the entire server did work.
Sorry to dig up an old thread, but I just had this too. About 300 or so users on the site so shouldn't be that bad.
Restarting PHP did nothing, restarting the server did nothing, then restarting MySQL worked.
Any more tips for debugging this would be welcome, it seems odd to me that restarting the server as a whole, which should include MySQL didn't work, but just MySQL did.
Error: connect() to unix:/var/run/php/php7.3-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream
For me restarting MySQL fixed the problem. I actually figure out putting the app down by executing the command: php artisan down ,then the app worked ( it returned under maintenance view).
Please or to participate in this conversation.