Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 2.11.0.0) 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: http://www.mono-project.com/FastCGI_Nginx and fastcgi-mono-server4 uses socket for listening nginx.

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

Thanks

share|improve this question
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.