nginx,php-fpm,fastcgiView the original page-Collection of common programming errors

UnKnown Error


  • Brendan
    centos nginx php-fpm mongodb 2013-11-29 18:03:17
    For the relevant part of our server stack, we’re running:NGINX 1.2.3 PHP-FPM 5.3.10 with PECL mongo 1.2.12 MongoDB 2.0.7 CentOS 6.2We’re getting some strange, but predictable behavior when the MongoDB server goes away (crashes, gets killed, etc). Even with a try/catch block around the connection code, i.e:try {$mdb = new Mongo(‘mongodb://localhost:27017’); } catch (MongoConnectionException $e) {die( $e->getMessage() ); }$db = $mdb->selectDB(‘collection_name’);Depending on which PHP-FPM wor

  • elssar
    nginx amazon-s3 pdf.js 2013-11-29 2:13:04
    I have an s3 bucket hidden behind an nginx proxy. If I try to view a PDF using that proxy, I get this errorXMLHttpRequest.responseType cannot be changed for synchronous HTTP(S) requests made from the window context. Warning: Unhandled rejection: Error: INVALID_ACCESS_ERR: DOM Exception 15But that same link downloads the file if I visit it from my browser.This is my nginx configuration for the proxy_passlocation ~* ^/s3_redirect/(.*) {internal;set $full_url http://$1?$query_string;s

  • silkAdmin
    node.js ubuntu nginx 2013-11-27 11:52:44
    I just grabbed that code from an online tutorial: var http = require(‘http’); http.createServer(function (req, res) {res.writeHead(200, {‘Content-Type’: ‘text/plain’});res.end(‘Hello World\n’); }).listen(3000, ‘my.ip.is.here’); console.log(‘Server running at http://my.ip.is.here:3000/’);When i start: node app.jsI get the following error: events.js:48throw arguments1; // Unhandled ‘error’ event^ Error: accept ENOSYSat errnoException (net.js:614:11)at TCP.onconnection (net.js:788:24)I am on a ubun

  • avatar
    django nginx fastcgi django-settings mod-fastcgi 2013-11-24 2:30:36
    I just upgraded from django 1.2.4 to 1.3. I’m using nginx in conjunction with fastcgi and for some reason every time when I access a page I get this error:Unhandled ExceptionAn unhandled exception was thrown by the application.Any ideas what the problem might be?

  • Harry
    nginx freebsd tcp kernel netstat 2013-11-23 5:50:46
    I have a decently high trafficked FreeBSD Nginx server, and I’m starting to get a large number of listen queue overflows:[root@svr ~]# netstat -sp tcp | fgrep listen 80361931 listen queue overflows [root@svr ~]# netstat -Lan | grep “*.80” tcp4 192/0/128 *.80 [root@svr ~]# sysctl kern.ipc.somaxconn kern.ipc.somaxconn: 12288 [root@svr ~]#However I can’t seem to increase the max listen queue length past 128. I’ve increased kern.ipc.somaxconn, but it’s not changing the max. Am I missing so

  • airplanemania
    django nginx flup 2013-11-23 5:18:40
    I’m trying to deploy a very simple django app to linode, but I keep getting “Unhandled Exception / An unhandled exception was thrown by the application,” which is horribly unhelpful. I’m using nginx as my webserver, and I’ve gone into its error logs to find this: 2013/07/13 11:41:52 [error] 6673#0: *1 FastCGI sent in stderr:”Traceback (most recent call last): File”/usr/lib/pymodules/python2.7/flup/server/fcgi_base.py”, line 558, inrunprotocolStatus, appStatus = self.server.handler(self) Fil

  • alfish
    nginx django uwsgi 502 2013-11-23 4:50:57
    I used this guide to set it up and it was working to server my django app for a while, but after adding a new django module, without touching any of the nginx or uwsgi configs, now the server leads to 502 502 Bad Gateway error. The nginx error.log says:*1 upstream prematurely closed connection while reading responseheader from upstream, client: x.x.x.x,server: blabla.com, request: “GET /HTTP/1.1″, upstream:”uwsgi://127.0.0.1:4000”, host:”x.x.x.x”I appreciate your hints to resolve this.

  • SandyD
    nginx 2013-11-23 4:41:11
    If I already have a bunch of virtualhosts, how can I create a virtual host to handle requests that don’t match any of the virtualhosts? (i.e. access by IP, another domain linking to IP, .etc .etc)

  • Amanada Smith
    python linux web-services nginx webserver 2013-11-23 4:33:26
    abrt: detected unhandled Python exception in ‘/usr/local/cpanel/hooks/addondomain/addaddondomain’code:#!/usr/bin/env python import subprocess import sys import os import yaml from xml.dom import minidom sys.path.append(‘/scripts’) import createvhosts doc = minidom.parse(sys.stdin)resulttaglist = doc.getElementsByTagName(‘result’) resultlist =[]if resulttaglist[1].childNodes[0].toxml() == 0:sys.exit else:subdomaintaglist = doc.getElementsByTagName(‘subdomain’)subdomain = subdomaintaglist[0].child

  • user162321
    apache2 nginx sql-server php5 zend-framework 2013-11-16 23:03:58
    Does anyone know how to solve the following issue? If not, does anyone know how to setup Zend 1 on Linux to communicate with msSQL server?We get the following error in the nginx logs when trying to use freetds and the pdo_dblib adapter. We’re running Zend 1.2 on Ubuntu 12.04 using nginx 1.2.72013/02/27 20:48:24 [error] 9057#0: *28 FastCGI sent in stderr: “PHP message: PHP Warning: include_once(Zend/Db/Adapter/Pdo/Dblib.php): failed to open stream: No such file or directory in /www/development/

  • Brendan
    centos nginx php-fpm mongodb 2013-11-29 18:03:17
    For the relevant part of our server stack, we’re running:NGINX 1.2.3 PHP-FPM 5.3.10 with PECL mongo 1.2.12 MongoDB 2.0.7 CentOS 6.2We’re getting some strange, but predictable behavior when the MongoDB server goes away (crashes, gets killed, etc). Even with a try/catch block around the connection code, i.e:try {$mdb = new Mongo(‘mongodb://localhost:27017’); } catch (MongoConnectionException $e) {die( $e->getMessage() ); }$db = $mdb->selectDB(‘collection_name’);Depending on which PHP-FPM wor

  • jannicars
    php nginx php-fpm 2013-9-30 10:56:15
    At the moment I’m experimenting with Nginx. I got it working using the newest version installed via repo. Everything works fine with Nginx standalone. Then I installed PHP 5.5.1 via sources that I can run different versions and not affection the production webserver and php version. (Nginx was running on another port then 80 for testing purposes.)Everything went fine. Compiled PHP 5.5.1 without errors, installed it, started PHP-FPM and changed the Nginx config to call PHP FPM when needed. My fir

  • johnny
    nginx php-fpm 2013-9-21 8:42:58
    Hi everyone I got some trouble with sessions that I use on my little project: PHP Notice: Undefined index: user_ID in ../config/sessions_class.php on line 29(this is from the nginx error.log)If tried setting the save path for sessions to memcache and to /var/lib/php5/sessions. Session files actually get created in the sessions directory, so the user permissions must be correct. I’m currently saving user settings to sessions such as $_SESSION[‘user_ID’] on index.php and then redirecting to anot

  • nojak
    nginx php-fpm debian-squeeze 2013-9-21 8:18:00
    Looking at my PHP-FPM stats page, it looks like only one process is handling all of the connections right now.My guess is that requests are being executed so quickly, thus far, that it doesn’t need to use another process yet. Would this be the case?Here’s what I’m seeing in my PHP-FPM stats page:pool www process manager static start since 432796 accepted conn 90399 listen queue 0 max listen queue 1 listen queue len 128 idl

  • eisaacson
    php-fpm rhel6 2013-9-21 8:06:44
    We’re running RHEL6 and just started getting this error when restarting php-fpm.PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/gd.so’ – /usr/lib64/php/modules/gd.so: undefined symbol: gdImageWebpCtx in UnknownI’ve tried restarting the server and running yum update but haven’t gotten rid of the error. Any help would be appreciated.

  • Jesse
    php wordpress nginx php-fpm w3-total-cache 2013-9-18 21:06:30
    I have W3TC, Nginx, varnish and php5-fpm installed on an Ubuntu 12.04 image with 768 MB RAM. The site itself is functioning fine, but when I try to access /wp-admin I get an HTTP 500 Internal Server error.I have went to the logs and have looked and found the following error:PHP message: PHP Fatal error: Allowed memory size of 67108864 bytesexhausted (tried to allocate 5184285 bytes) in/var/www/wp-includes/functions.php on line 251 while reading responseheader from upstreamI have seen many post

  • hakre
    php nginx php-fpm 2013-9-16 0:46:02
    Nginx works in conjunction with php-fpm, php5.4.When submitting a form with the Content-Type multipart / form-data obtained by this error:2012/09/21 18:54:47 [error] 31051#0: *9 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: x.x.x.x, server: x.x.x.x, request: “POST /admin/news/edit.php?news_id=9032&action=edit HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9900”, host: “x.x.x.x”, referrer: “http://x.x.x.x/admin/news/edit.php?news_id=9032&act

  • nickhar
    imagick php-fpm 2013-8-18 2:41:20
    error message:/usr/local/php/sbin/php-fpm start/usr/local/php/sbin/php-fpm: symbol lookup error: /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/imagick.so: undefined symbol: MagickWandGenesis

  • pauska
    nginx php-fpm magento 2013-6-30 4:02:30
    I have been trying to resolve my issue of spiking cpu caused by php-fpm processes. I’ve reduced the php-fpm config settings to:pm = ondemand pm.max_children = 12 pm.start_servers = 2 pm.min_spare_servers = 2 pm.max_spare_servers = 10 pm.max_requests = 500 php_admin_value[memory_limit] = 128MProblem still exists. I’m running a Joomla main site (which is having no problems) and a Magento store in a sub-directory. My server is a Linux CentOS, running NGINX, APC, Memcached, Full Page Cache and php-f

  • Hoff
    ubuntu nginx php-fpm 2013-6-30 3:57:52
    I have set up a local testing VM with Ubuntu Server 12.04 LTS and the LEMP stack. It’s kind of an unconventional setup because instead of having all my PHP scripts on the local machine, I’ve mounted an NTFS share as the document root because I do my development on Windows. I had everything working perfectly up until this morning, now I keep getting a dreaded ‘File not found.’ error.I am almost certain this must be somehow permission related, because if I copy my site over to /var/www, nginx and

  • mcanes
    python django fastcgi 2013-11-27 18:21:03
    I’m trying to deploy my django project on a shared hosting as describe hereI have my project on /home/user/www/testaI’m using this script#!/usr/bin/python import sys, ossys.path.append(“/home/user/bin/python”)sys.path.append(‘/home/user/www/testa’)os.chdir(“/home/user/www/testa”)os.environ[‘DJANGO_SETTINGS_MODULE’] = “settings.py”from django.core.servers.fastcgi import runfastcgi runfastcgi(method=”threaded”, daemonize=”false”)And here’s the error I get when trying to run it from shell:WSGIServe

  • avatar
    django nginx fastcgi django-settings mod-fastcgi 2013-11-24 2:30:36
    I just upgraded from django 1.2.4 to 1.3. I’m using nginx in conjunction with fastcgi and for some reason every time when I access a page I get this error:Unhandled ExceptionAn unhandled exception was thrown by the application.Any ideas what the problem might be?

  • MattyB
    python fastcgi mod-fcgid 2013-11-16 22:25:36
    I am trying to configure the Python mini-framework CherryPy with FastCGI (actually fcgid) on Apache. I am on a shared host, so I don’t have access to httpd.conf, just htaccess. I have followed these tutorials to no avail:tools.cherrypy.org/wiki/FastCGIWSGI tools.cherrypy.org/wiki/BluehostDeploymentI keep getting 500 errors w/ the Apache logs saying “Premature end of script headers”. I have tried everything (permissions/shebangs/full-paths/deamonized/not-daimonized). I know Apache is correctly ex

  • fasih.ahmed
    c++ apache fastcgi mod-fastcgi 2013-11-13 5:50:33
    I’m trying to make an experimental FastCGI app and I keep getting a certain error.I’ve compiled all the binaries and libs except apache (shipped with Mac) on the machine.The error is as follows:[Thu Jul 25 20:40:34 2013] [warn] FastCGI: (dynamic) server “/Library/WebServer/CGI-Executables/tiny-cgi.fcgi” started (pid 49396) dyld: Library not loaded: /Users/fasihrana/Documents/apparicion/fcgi-dev/lib/libfcgi.0.dylibReferenced from: /Library/WebServer/CGI-Executables/tiny-cgi.fcgiReason: no suitabl

  • Levi
    java php fastcgi 2013-11-7 19:00:58
    I’m trying to move a JaveBridge’ed project to a new server. Its running PHP w Java throught sun-java6. I don’t know how to read java error output and was hoping one of you could point me in a direction to figured what to do on the server to make this app happy.Fatal error: Uncaught [[o:Exception]:”java.lang.Exception: CreateInstance failed: new com.elance.proposal.html2image.client.MainBridge. Cause: java.lang.ClassNotFoundException: com.elance.proposal.html2image.client.MainBridge VM: 1.6.0_06

  • mikez302
    python fastcgi wsgi stderr 2013-11-6 23:49:11
    I am working on a website, hosted on DreamHost, using Python. For a while, I was using their default setup, which runs Python scripts using CGI. It worked fine, but I was worried that if I get a lot of traffic, it would run slow and use a lot of memory, so I switched it over to FastCGI using this module.Overall, it still works fine, but there is one major annoyance: I can’t seem to be able to see anything that gets written to the standard error stream. If anything goes wrong, my usual source of

  • saverio
    php exception fastcgi exit 2013-11-4 13:40:50
    My app has a registered shutdown function and it seems there’s some issues with that and my method of using an exception with a try/catch to exit the application (instead of using the exit() method due to FastCGI not liking this).My problem is that if another exception is thrown in the try/catch block that isn’t the ExitApp exception, it causes some unexpected results and the end result is the ExitApp exception isn’t caught. I’m seeing this on PHP 5.3.6, going to test it on another version now,

  • Atm
    php memcached fastcgi lighttpd php-extension 2013-9-29 7:55:49
    I am using the following:lighttpd/1.4.31 (ssl) lighttpd-fastcgi php 5.3.16 php-pecl-memcache CentOSI have memcached service running. phpinfo() reports that memcache extension is installed. My application is using memcache extension successfully, servicing thousands of queries. This is how I am initialising memcache:$memcache = new Memcache; $memcache->connect(‘localhost’, 11211);However, after reading error log, I notice that right after I restarted lighttpd, and then once in a while log g

  • Brad
    iis6 php5 fastcgi isapi moodle 2013-9-21 11:01:34
    I am working with Moodle 1.9 running on Windows Server 2003, IIS 6. I am trying to switch from PHP’s ISAPI extension to FastCGI, hoping for a speed improvement.I installed FastCGI for IIS 6 just fine, and configured it for PHP. It works, and in fact most of Moodle works great. The only thing that doesn’t, is the home page. When running as FastCGI, I get this error:PHP Notice: Undefined index: description in C:\Inetpub\wwwroot\moodle\lib\magpie\rss_parse.inc on line 402So I thought, “Hmmm,

  • Justin M
    django postgresql connection fastcgi flup 2013-9-10 16:54:53
    I am pulling my hair over this and am about ready to do something dirty.I am running nginx + django + postgresql. Half the time I am trying to test my site and open a page, I get the following:<class ‘psycopg2.InterfaceError’> Python 2.7.2: /home/webapp/newavenue/bin/python Fri Feb 24 08:28:58 2012 A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred./home/webapp/newavenue/lib/python2.7/site-packages/flup/server