Bad gateway 502 after small load test on fastcgi-mono-server through nginx
and ServiceStack
I am trying to run a webservice API with ServiceStack under nginx and
fastcgi-mono-server.
The server starts fine and the API is up and running. I can see the
response times in the browser through ServiceStack profiler and they run
under 10ms.
But as soon as I do a small load test using "siege" (only 500 requests
using 10 connections), I start getting 502 Bad Gateway. And to recover, I
have to restart the fastcgi-mono-server.
The nginx server is fine. The fastcgi-mono-server is the one that stops
responding after this small load.
I've tried using both tcp and unix sockets (I am aware of a permissions
problem with the unix socket, but I already fixed that).
Here are my configurations:
server {
listen 80;
listen local-api.acme.com:80;
server_name local-api.acme.com;
location / {
root /Users/admin/dev/acme/Acme.Api/;
index index.html index.htm default.aspx Default.aspx;
fastcgi_index Default.aspx;
fastcgi_pass unix:/tmp/fastcgi.socket;
include /usr/local/etc/nginx/fastcgi_params;
}
}
To start the fastcgi-mono-server:
sudo fastcgi-mono-server4
/applications=local-api.acme.com:/:/Users/admin/dev/acme/Acme.Api/
/socket=unix:/tmp/fastcgi.socket /multiplex=True /verbose=True
/printlog=True
No comments:
Post a Comment