[Mono-aspnet-list] Apache2/mod_mono compiling on every request

Andrus kobruleht2 at hot.ee
Sat Mar 31 20:59:38 UTC 2012


1. Check that application will not create or change files in application directory
remove write attrubute from it and from its subdirs.
2. Create pre-compiled site in windows and deploy it to linux instead of source files

Andrus.


From: Daniel J. Summers 
Sent: Saturday, March 31, 2012 11:08 PM
To: mono-aspnet-list 
Subject: [Mono-aspnet-list] Apache2/mod_mono compiling on every request

This has got me a bit stumped.  I have an ASP MVC 3 app that's current running in production on Ubuntu 11.10 x86_64 server using Mono 2.10.5 from the Ubuntu repositories.  In production, the first time the app is hit, it goes through and compiles it; you can watch it with "ps -ef", and subsequent hits use that compiled version.  This is the expected behavior, so hooray for that. 

I'm working on the next version of the application, and in the interim, have changed development machines.  I'm developing it on Windows 7, and I've created a VirtualBox server mirroring the specs described above.  I'm testing the application there in advance of putting it live, and I noticed that every hit took longer than it should.  One page won't even pull up, saying that the view cannot be found; I think this may be the compilation timing out.  The more complex a page is, the longer it seems to take.  Repeated hits to a page do seem a bit faster, but there's still a compilation process being kicked off.  I suspected a permissions issue, but I checked /tmp/www-data-temp-aspnet-0 directory (the output directory specified in the "ps"), and there are several directories underneath that, all with the compiled app, so that's not it.

The app has changed a bit.  The new release adds globalization/localization, with Resources.resx and Resources.es.resx providing the labels and images (a few).  Of course, there are upgraded libraries and that sort of thing, but the globalization is the new thing.  The /bin directory has the DLLs for the web app, the business logic layer, supporting DLLs (no new ones), and a bin deployment of ASP MVC 3; and the /bin/es directory has AppName.resources.dll (this part is new).

Do any of you fine folks have an idea what may be causing this?  I'm hesitant to push this out with it behaving like this, in case it's not just a configuration parameter I have wrong on the server.  (The virtual host/mod_mono config is the same between servers, except for the server name.)  I'd appreciate any help anyone could provide.

-- 

Daniel J. Summers
Owner, DJS Consulting
E-mail • Website • Support • Tech Blog


GEEKCODE 3.12 GCS/IT d s-:+ a C++ P--- L++ E--- W++ N++ o? K- w !O M--
V PS+ PE++ Y? PGP- t+ 5? X+ R* tv b+ DI++ D+ G- e<++ h---- r+++ y++++



--------------------------------------------------------------------------------
_______________________________________________
Mono-aspnet-list mailing list
Mono-aspnet-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20120331/b7142787/attachment.html>


More information about the Mono-aspnet-list mailing list