Questions tagged [fastcgi]

FastCGI is an optimized implementation of the CGI interface that aims to reduce the processing overhead for each CGI request on a webserver.

FastCGI is an optimized implementation of the CGI interface that aims to reduce the processing overhead for each CGI request on a webserver.

External reference:

2050 questions
441
votes
10 answers

Where can I find the error logs of nginx, using FastCGI and Django?

I'm using Django with FastCGI + nginx. Where are the logs (errors) stored in this case?
ha22109
  • 8,036
  • 13
  • 44
  • 48
333
votes
16 answers

upstream sent too big header while reading response header from upstream

I am getting these kind of errors: 2014/05/24 11:49:06 [error] 8376#0: *54031 upstream sent too big header while reading response header from upstream, client: 107.21.193.210, server: aamjanata.com, request: "GET…
Vidyut
  • 3,489
  • 2
  • 13
  • 10
214
votes
5 answers

How do I prevent a Gateway Timeout with FastCGI on Nginx

I am running Django, FastCGI, and Nginx. I am creating an api of sorts that where someone can send some data via XML which I will process and then return some status codes for each node that was sent over. The problem is that Nginx will throw a 504…
sheats
  • 33,062
  • 15
  • 45
  • 44
210
votes
28 answers

Nginx serves .php files as downloads, instead of executing them

I am installing a website in a droplet (Digital Ocean). I have an issue for install NGINX with PHP properly. I did a tutorial https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-14-04 but when I…
Apeiron
  • 1,881
  • 2
  • 13
  • 21
155
votes
13 answers

Prevent nginx 504 Gateway timeout using PHP set_time_limit()

I am getting 504 timeouts message from nginx when my PHP script is running longer than usual. set_time_limit(0) does not seem to prevent that! Does it not work when running php5-fpm on nginx? If so, whats the proper way of setting the time…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
136
votes
3 answers

What is the difference between fastcgi and fpm?

I am trying to install php with fpm on macports. I read somewhere that fpm means FastCGI process manager. Does that mean fastcgi and fpm are same? If they are same, then why do we have two different macports variants for php namely "php5 +fastcgi"…
Deepan Chakravarthy
  • 4,154
  • 7
  • 25
  • 21
92
votes
4 answers

nginx: connect() failed (111: Connection refused) while connecting to upstream

Trying to deploy my first portal . I am getting 502 gateway timeout error in browser when i was sending the request through browser when i checked the logs , i got this error 2014/02/03 09:00:32 [error] 16607#0: *1 connect() failed (111:…
Abhishek Tripathi
  • 1,570
  • 3
  • 20
  • 32
85
votes
2 answers

Increasing 504 timeout error

Is there any way I can make the error 504 gateway timeout longer if so how and where is the file to change it located. I am using nginx on centos 6
Matthew Jones
  • 971
  • 1
  • 7
  • 6
83
votes
4 answers

Differences and uses between WSGI, CGI, FastCGI, and mod_python in regards to Python?

I'm just wondering what the differences and advantages are for the different CGI's out there. Which one would be best for python scripts, and how would I tell the script what to use?
Parker
  • 8,539
  • 10
  • 69
  • 98
79
votes
15 answers

PHP-FPM and Nginx: 502 Bad Gateway

Configuration Ubuntu Server 11.10 64 bit Amazon AWS, Ec2, hosted on the cloud t1.micro instance Before I write anything else, I'd like to state that I've checked both nginx 502 bad gateway and Nginx + PHP-FPM 502 Bad Gateway threads, which…
zeboidlund
  • 9,731
  • 31
  • 118
  • 180
69
votes
10 answers

How to debug "FastCGI sent in stderr: Primary script unknown while reading response header from upstream" and find the actual error message?

SO has many articles mentioning this error code: FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream... That probably means that this error message is more or less useless. The message is telling us that…
101010
  • 14,866
  • 30
  • 95
  • 172
64
votes
14 answers

nginx 502 bad gateway

I get a 502 Bad Gateway with nginx when using spawn fcgi to spawn php5-cgi. I use this to span an instance on server start using the following line in rc.local /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data -f /usr/bin/php5-cgi -P…
Joel Wickard
  • 1,159
  • 1
  • 10
  • 15
55
votes
3 answers

mod_php vs cgi vs fast-cgi

I have been trying to understand the exact meaning/purpose of loading php as an apache module vs the rest. When php is installed as an apache module, what exactly happens? For example, does reading the php-ini file happen every time the php request…
Karthick
  • 2,844
  • 4
  • 34
  • 55
46
votes
7 answers

Apache or Nginx to serve Django applications?

I want to deploy a Django web application, and hence I need to choose a web server to serve the Python files. I should mention that my production site will be on a single server, which will host the database and the web server. As momentum picks, I…
Barry Steyn
  • 1,563
  • 3
  • 19
  • 25
46
votes
4 answers

Error 502 in nginx + php5-fpm

I have some error with subj. Server doesn't high loaded: ~15% CPU, there are several Gb of memory, HDD is not buisy. But error 502 throws approximately in 3% of cases. Programs: Debian 6, nginx/0.7.62, php5-fpm (5.3.3-1). In error.log of nginx is…
andre487
  • 1,261
  • 2
  • 18
  • 27
1
2 3
99 100