http-status-code-503

Show a custom 503 page if upstream is down

為{幸葍}努か 提交于 2019-11-28 07:05:24
I am using nginx as a frontend to an apache server. The config file looks like: upstream apache { server localhost:8000; } server { listen 80; error_page 503 /www/static/503.html; # need some magic here # location /static/ { root /www/static/; } location / { proxy_path http://apache/; } } For now, when apache is down, I receive a plain 502 page generated by nginx. How to make it serve my custom error page and return status code 503 which is more relevant in this situation? Something like this upstream apache { server localhost:8000; } server { listen 80; error_page 502 503 /www/static/503.html

IIS7: A process serving application pool 'YYYYY' suffered a fatal communication error with the Windows Process Activation Service

ぐ巨炮叔叔 提交于 2019-11-28 05:42:39
We're running a 32-bit Windows server 2008 with an IIS version of 7. We're attempting to publish an asp.net 4.0 webapp and so far our attempts have only yielded a few warnings in the serverlog without even stopping the 4.0 application pool A process serving application pool 'ASP.NET v4.0' suffered a fatal communication error with the Windows Process Activation Service. The process id was '1904'. The data field contains the error number. The application is running under a 4.0 app-pool and under the default website. We've also got some older .asp's running flawlessly. Even when attempting to

Throwing a custom 503 exception in CakePHP 2

元气小坏坏 提交于 2019-11-28 05:35:09
问题 I need to give a 503 Service Unavailable HTTP header. Normally I use these for 404 and 500 codes throw new NotFoundException(); throw new InternalErrorException(); But I couldn't find relevant exception for 503 in CakePHP 2.2? In my "app/lib/AppExceptionHandler.php" file I have this class/function that handles errors. class AppExceptionHandler { public static function handle($error) { } Edit: Inside " app/Lib " folder I created a file named " MyExceptions.php ". I wrote the following code

HTTPError: HTTP Error 503: Service Unavailable goslate language detection request : Python

风格不统一 提交于 2019-11-27 14:41:53
I have just started using the goslate library in Python to detect the language of the words in a text but after testing it for 7-8 inputs, I gave the input which had the words written in two languages, Arabic and English. After which, it started giving me the error. Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> execfile("C:/test_goslate.py"); File "C:/test_goslate.py", line 12, in <module> language_id = gs.detect('الدولة') File "C:\Python27\lib\site-packages\goslate.py", line 484, in detect return self._detect_language(text) File "C:\Python27\lib\site

Whenever a CORS $http request fails, the response returned is always 0

ε祈祈猫儿з 提交于 2019-11-27 06:56:01
问题 this is a similar question to this post in SO.But the answer provided here cannot be applied in my case as i cannot change the response headers from server. Suppose an http POST to a different origin. This implies CORS, including a CORS preflight exchange. Now suppose the OPTIONS request returns a 503 service unavailable error due to a server problem. In this case the error handler gives "" for data and 0 for status instead of giving me the status code 503 and the text: service not available

IIS7: A process serving application pool 'YYYYY' suffered a fatal communication error with the Windows Process Activation Service

心不动则不痛 提交于 2019-11-27 01:01:50
问题 We're running a 32-bit Windows server 2008 with an IIS version of 7. We're attempting to publish an asp.net 4.0 webapp and so far our attempts have only yielded a few warnings in the serverlog without even stopping the 4.0 application pool A process serving application pool 'ASP.NET v4.0' suffered a fatal communication error with the Windows Process Activation Service. The process id was '1904'. The data field contains the error number. The application is running under a 4.0 app-pool and

HTTPError: HTTP Error 503: Service Unavailable goslate language detection request : Python

折月煮酒 提交于 2019-11-26 16:51:15
问题 I have just started using the goslate library in Python to detect the language of the words in a text but after testing it for 7-8 inputs, I gave the input which had the words written in two languages, Arabic and English. After which, it started giving me the error. Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> execfile("C:/test_goslate.py"); File "C:/test_goslate.py", line 12, in <module> language_id = gs.detect('الدولة') File "C:\Python27\lib\site-packages