[Mono-list] Heavy loaded web-site on Mono

Marek Habersack grendello at gmail.com
Sun May 20 17:38:57 EDT 2007


On Sat, 19 May 2007 20:09:19 +0400 (MSD), "makska" <makska at yandex.ru> scribbled:

> Hello!
Hello,

> Now I'm trying to launch big web-site consists of about 100.000 dynamic
> web-pages (about 100kb each without images) which has about 50.000 hits per
> day.
> 
> I've got some difficulties launching this web-site on FreeBSD with Mono 1.2.3:
> 
> 1. Uncontrolled grow of used memory. After about hour or two mono process
> grows up to 2-3Gb and goes down (visitors get "Service temporary unavailable"
> error). Web-application didn't contain any big object in memory, just 100-200
> entries in Cache object with sliding expiration. Web-pages are simple too: 5
> aspx pages with several user controls. Is the reason of this situation in
> non-compactiong GC in Mono or in possible programmers errors?
As Miguel advised in another post, could you run your application with
heap-shot and post the results?

> 2. Behavior of Cache object. Value of Cache.Count variable is in about 2
> times higher than number of Keys available via Cache.GetEnumerator(). Even
> when I didn't add any object to Cache, Cache.Count indicates 20-30 entries
> which are unavailable via enumerator.
The difference is actually a small bug in the cache implementation. Our cache
contains both public (set by the application) and private (used by, e.g., the
ASP.NET compiler) entries. When you ask for Cache.Count, an internal count of
the hashtable used by the cache to hold the data is returned - this count
includes the private members. When, however, you request the enumerator, only
the public members are returned (the enumerator to a dynamically allocated
ArrayList is returned, not to the underlying hashtable). I will probably
separate the private cache from the public one to get rid of that discrepancy.

best regards,

marek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20070520/37e38cc0/attachment.bin 


More information about the Mono-list mailing list