Apache :: Randomly Receive 502 Bad Gateway Error (2.4.4)
Jul 23, 2013
I am currently running apache 2.4.4 with Tomcat and randomly i receive the following error when i try to hit the external URL:
Bad Gateway
The proxy server received an invalid response from an upstream server
====================================================
Inside apachie error.log file., i also see the following error, i am not sure if they are related:
"The specified network name is no longer available. : AH00341: winnt_accept: Asynchronous AcceptEx failed."
When I turn on nginx for the server I am able to browse non SSL protected sites correctly. I receive a 502 Bad Gateway error on any sites that have an SSL certificate. Is there a fix for this? I have been unable to find one.
I use apache 2.4.1 and mod_fcgid (same config form apache 2.2.22+mod_fcgid 2.3.6) and without any error message, apache stop responding randomly.There is no problem with apache 2.2.22+mod_fcgid 2.3.6 and with apache 2.4.1 + php5_module i have
Randomly my server goes offline. There is no pattern to this. It can be fine for weeks then have 5 issues in one day. I have to restart Apache and it all come back on.
I'm not sure where to start to look for errors as I'm not that experienced.
Server Info Windows Server 2008 R2 Standard Edition PHP Version5.4.9 Apache VersionApache/2.4.1 (Win32) MySQL version 5.0.10
my local host is just taking incredibly long to load. At work I've set it up no differently and it works like a charm, but at home, it works.. But at times it doesnt load instantly until I restart my browser. I have to press refresh or enter to login a million times for it to load after the first few seconds I use it.
I am trying to fix website [URL] .... I open the site like 20 times a day and like 2 times a day it shows blank page. Which logs I need to check or which tools to use? I have cpanel hosting, apache.
I have upgraded from 11.5 to 12, and now if I try to open Plesk on the port 8443 I have this error:
502 Bad Gateway
nginx
This is the log: 2014/06/27 18:25:13 [crit] 1629#0: *2 connect() to unix:/var/run/sw-engine.sock failed (2: No such file or directory) while connecting to upstream, client: 79.49.206.176, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "87.106.85.233:8443"
We are running Plesk 12 (latest version) on openSuse 13.1. The web server is nginx as a proxy in front of Apache. We are running into a 502 Bad Gateway nginx error when trying to send data from a simple form to a php script.
The log shows: upstream prematurely closed connection while reading response header from upstream
It seems that Plesk does not configure nginx properly as some pages, especially pages that are accessed via https have broken headers. The headers of a page that is displaying
HTTP/1.1 400 Bad Request => Server => nginx Date => Sat, 26 Jul 2014 09:53:13 GMT Content-Type => text/html Content-Length => 166 Connection => close
I just installed WAMPP on Windows Vista 32 machine. I am using Firefox. When I try the localhost, I receive a 404 error. I have no idea what else to check the UAC is off, port 80 is free, I am running Avast as my anti-virus. I am a complete newbie to PHP, Apache, & MySql. I am trying to learn so I can run some PHP scripts for my website.
under Plesk 12.0.18 PHPMyAdmin is failing to import a 3 MB SQL dump of a simple Joomla website. "Error 505 Bad Gateway", it says.It happens with other dumps too, some as small as ~500 KB. The format (SQL or ZIP) of the file uploaded doesn't seem to matter, because the upload itself seems to work; it seems it's the post-processing what is raising the error.
The funny thing is that the import itself seems to work (the contents of the SQL dump are imported), but the error message appears and causes confusion and support requests from our clients./var/log/sw-cp-server/error_log says:
2015/05/15 03:19:31 [error] 10215#0: *5 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: XX.XX. XXX. XXX, server: , request: "POST /domains/databases/phpMyAdmin/import.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "xxxx. xxxxxxx.com:8443", referrer: URL.....To me it sounds like a timeout.
This seems to be a "popular" error among Plesk users, and I have tried this, this and this with no luck.
As I read, when Plesk and WHMCS are in the same server, you may have 502 bad gateway errors when creating an account through WHMCS..Page not Found/Timeout/502 Bad Gateway error creating accounts with Plesk 10+..By default Plesk 10 and above performs a forced restart of apache when an account is created or suspended which causes WHMCS to lose connection to the server, and if your WHMCS is on the same server, you will also lose connection to WHMCS at the same time.
In order to resolve this please refer to the following knowledgebase article for instructions on configuring Plesk to perform a graceful restart instead: URL..
But when I activate nginx in Plesk the 502 bad Gateway problem comes back.Is there an option to activate Nginx graceful restart in Plesk?
We found 502 Bad Gateway error Nginx on multiple domain "currently troissoeursetunfrere.com is a wordpress site e-commerce" and also malittleboutique.com ecommerce wordpress, possibly to fix this problem we have followed this tutorial " [URL] ....
I set up my domain [url]& uploaded my Wordpress theme on my host, but receive an error, as follows:
"Fatal error: Call to undefined function: get_header() in /home/michelz/public_html/lendadvisors/index.php on line 1"
Also I set up a free Wordpress account for this purpose. So far I don't have any experience with hosting Wordpress on my host! How can I get things work?
A few day ago when i access Windows plesk i receive error Access Denied. [URL]..... Even i made these steps i still receiving Access Denied when i access. I tried use PLesk REconfigurator, put psaadm permissons on all C:, update plesk, windows and still having this issue.
I am looking for setup a gateway (reverse proxy I guess?), specifically how to configure Apache to point to different webservers depending on domain name.
I currently have a single webserver running multiple virtual domains all accessible via a single external IP address.
I would like to break this into 2 servers each running multiple virtual domains accessible via gateway with a singe external IP address.
As an example, a single internet IP address points to port 80 on the gateway machine. The gateway machine will determine if its example1.com, example2.com, example3.com or example4.com. If its example1.com or example2.com it will direct internally to webserver1 and if its example3.com or example4.com it will direct internally to webserver2.
Webserver1 and webserver2 each host different websites via virtual hosts.
Is this possible and if so, what is the correct configuration of the gateway machine. I currently have installed apache2 with mod_proxy enabled, but I am struggling with configuring it properly.
Usually everything has been working fine with this .htaccess-file until today. There hasn't been any change on the system.
If you click on the hyperlink to the restricted area the login window appears where you need to type in your username and a password. After typing in these data the following message appears in the browser:
500 Internal Server Error
The server encountered an internal error or misconfigruation and was unable to complete your request. (…)
The apache error log file contains the following message:
Request exceeded the limit of 10 sub request nesting levels due to probable configuration error.
Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
The increase of the LimitInternalRecursion does not solve the problem. So I switched the LogLevel in the httpd.conf file from warn to debug and looked again on the entries of the error log.
The following appeared (I have replaced ip addresses, usernames and URL by xyz or <URL>) :
Code:
[error] [client xyz] mod_digest_apple: Client is using a nonce not issued by this server for this context:/rb/Vorlesung/WS12/Downloads/, referer: http:<URL>
The problem is that it switches from running to mounted without me having anything to do with it. It seems to be quite randomly, for example this morning at 1.42 am. This happens once a day and stops my vps and therefore my website - which is quite annoying.
I checked for log files or anything, but there was nothing mentioning resources or anything.
Does anyone have a clue what this might be? If I cannot fix the problem there is still the opportunity to just start the vps once it goes to status mounted. How would I automate this?
I just built a new pc, everything works well, but sometimes my computer will just restart randomly, it doesnt happen immedietly but randomly, within 30 or more minutes operating. Any ideas to why? and how i can fix it? ...
I am creating a web application, nothing spectacular just something to display content.
After completing a long night of coding, I uploaded my files to my server and checked to make sure everything was functioning correctly. Everything seemed fine so I went to bed.
The next morning, to my surprise, all my images had dissapeared! Well not all of them, just the ones being displayed through the PHP script. (coincidentally, these images where all in the same directory...)
Of course the first thought that went through my mind was "scripting error". Which surprised me, since everything worked perfectly the night before. I checked and double checked everything, and I couldn't find anything wrong. I checked the permissions on the directory holding the images and they appeared correct (755). So, to locate the problem I decided to strip out all the variables and create a test page that had only the SQL query, and a print to output the <img> code. Still nothing! So I decided to just go the HTML route and create a test file that held only the <img> code, no PHP involved... nothing.
The images are on the server. I double checked... if you right click > view image, it shows up. Then if you go back to the "test" page and refresh the image is there... however, it does not appear when you first load the page, or it appears and then immediately dissapears.
I contacted my host about the issue, and their first response said:
Quote:
Dear customer, The images are there if you login through plesk control panel and go to File Manager under your domain you can find the pictures and see them.But some of them are not opening under your website. Best Regards
Honestly... are you kidding me? Reiterating my question doesn't constitute as an answer. And they call themselves "engineers"...
Seeing as it appears to only be affecting one directory (and possibly only JPG images...? Have a look at the test pages above), I believe it might be a permissions issue.
I haven't really done anything new other then added another forum on the server (Invision).
Basically the problem is the random spikes I get. The main forum that is running on the server haven't really increased in terms of sim connections. Its usually around 180 - 220 during peak times.
On TOP there is usually around 250 tasks. When this thing started happening it would spikes to 500+ tasks which totally kills the server. Its pretty random also. Sometimes it'll go fine for a few hours and then suddenly climbed slowly up and then the server dies. For now its going to crash whenever I let apache run for an hour or so.
The only way I can restore is to restart apache. It has come to the point where I've had to put in restart apache in the cronjob list. Restart it every few minutes since I'm not always here watching over it. This is obviously a shortterm solution to keep the forum up while I troubleshoot this.
Today we received an email saying that the admin password for the server had been changed by them and that we should log in and change the password again ourselves.
49pence have provided no explanation as to why the password was changed and despite multiple requests have refused to give any kind of explanation. I've also asked to speak to a manager and this request was denied (well, more ignored and I was given the same line that they cannot disclose why they changed a customers' password).