Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We started testing our MVC4 app on xsp4 server compiled with mono-3.0.3, speed was enough and we decided to set up production fastcgi-mono-server4 (version with nginx (1.2.6-r1).

Single query that loads some JSON query took ~200ms on XSP4, but Nginx serves the query in about 1.2s and I am wondering where could be such a slow down?

I followed nginx configuration: and fastcgi-mono-server4 uses socket for listening nginx.

Do you have any ideas how to log some time stamp which will help me?


share|improve this question

First, using version 2.11.x is a guarantee for trouble. 11 is an odd number, which means it is an unstable version.

Therefore, avoid 2.11.x and upgrade to 3.x (x being an even number, that is, 0, or 2).

Second: if you use Mono 3.2.x instead of 3.0.x, you will be using the new garbage collector by default, which I'm sure will be much faster.

Last but not least, be aware of some HA & performance issues:

  1. Look at this stackoverflow answer to know how to avoid "backlog too deep" problems (translated as 502s by NGinx).
  2. Use the --server flag when calling mono (you may need to hardcode this flag in the mono-fastcgi-server script of your system). This feature was introduced in mono 3.2.3.
  3. If you still experience bad performance, try compiling Mono yourself with this patch applied (which will be hopefully included in Mono 3.2.5 version).
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.