[Mono-list] /tmp/mod_mono_server and Increase MAXHINCR or MAX_HEAP_SECTS
Barbara Plank
barbara@idealnet.com
Wed, 13 Oct 2004 10:51:50 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0000_01C4B112.A81BD320
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Hi Mono-list,
My situation:
I have an asp.net application using mysql/bytefx and it works on Mono (on
Red Hat9, Apache 2, Mono 1.0.2).
Yesterday I tested the app and it worked. I let the server running over
night, doing nothing, just waiting for requests, since I wondered if it
remains running... Then today morning, I wanted to try again to access the
web application but the site did not open... Server error... As soon as I
issued the first request today morning, mod-mono went down, and I found the
following output on the mod-mono console:
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
Aborted
And surprise: I found the following in the apache log:
[Wed Oct 13 08:35:38 2004] [error] mod_mono: connect error (Permission
denied). File: /tmp/mod_mono_server
After restarting mod_mono and apache the web app worked again.
My questions:
- Is it that mod_mono after a while running not getting any request
is restarted? And that is causing the problem? Because each time I start
mod_mono I have to manually change the permission of this temporary file.
- If yes, how can I automate the permission changing of
/tmp/mod_mono_server
- Or is not mod_mono restarted, is it just that this temporary file
will be destroyed after a certain amount of time and recreated when the next
request comes?
- Or is this error message related to something else, not to this tmp
file?
- Or do I have something wrong in my configuration (see below?)
Do you have any idea? Or advice? Or can you help me?
Thank you in advance!!
Barbara
My configuration:
Content of /etc/httpd/conf.d/mod_mono.conf :
LoadModule mono_module /usr/lib/httpd/modules/libmod_mono.so
Content of httpd.conf:
...
<snip>
#
# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf
</snip>
...
...
<snip>
Alias /ship "/usr/share/web/ship"
MonoApplications "/ship:/usr/share/web/ship"
<Location /ship>
AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx
</Location>
</snip>
...
...
When I start the web application:
[root@localhost web]# mono /usr/bin/mod-mono-server.exe --root
/usr/share/web/ship --applications /ship:/usr/share/web/ship
mod-mono-server
Adding applications '/ship:/usr/share/web/ship'...
Registering application:
Host: any
Port: any
Virtual path: /ship/
Physical path: /usr/share/web/ship
Listening on: /tmp/mod_mono_server
Root directory: /usr/share/web/ship
Hit Return to stop the server.
And:
[root@localhost web]# chmod 777 /tmp/mod_mono_server
[root@localhost web]# service httpd restart
------=_NextPart_000_0000_01C4B112.A81BD320
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.EmailStyle18
{mso-style-type:personal-compose;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 77.95pt 1.0in 77.95pt;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:574168047;
mso-list-type:hybrid;
mso-list-template-ids:-436284604 1427246402 67698691 67698693 67698689 =
67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>Hi Mono-list,<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><b><font size=3D2 face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-weight:bold'>My =
situation:<o:p></o:p></span></font></b></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>I have an asp.net application using mysql/bytefx and it works on =
Mono (on
Red Hat9, Apache 2, Mono 1.0.2). <o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>Yesterday I tested the app and it worked. I let the server =
running over
night, doing nothing, just waiting for requests, since I wondered if it =
remains
running... Then today morning, I wanted to try again to access the web
application but the site did not open... Server error... As soon as I =
issued
the first request today morning, mod-mono went down, and I found the =
following
output on the mod-mono console:<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><b><font size=3D2 face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-weight:bold'>Too many heap sections: =
Increase
MAXHINCR or MAX_HEAP_SECTS<o:p></o:p></span></font></b></p>
<p class=3DMsoPlainText><b><font size=3D2 face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-weight:bold'>Aborted<o:p></o:p></span></fo=
nt></b></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>And surprise: I found the following in the apache =
log:<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>[Wed Oct 13 08:35:38 2004] [error] mod_mono: connect error =
(Permission
denied). File: /tmp/mod_mono_server<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>After restarting mod_mono and apache the web app worked =
again.<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'> <o:p></o:p></span></font></p>
<p class=3DMsoPlainText><b><font size=3D2 face=3D"Courier New"><span
style=3D'font-size:10.0pt;font-weight:bold'>My =
questions:<o:p></o:p></span></font></b></p>
<p class=3DMsoPlainText =
style=3D'margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 =
lfo1'><![if !supportLists]><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'><span
style=3D'mso-list:Ignore'>-<font size=3D1 face=3D"Times New Roman"><span
style=3D'font:7.0pt "Times New =
Roman"'>
</span></font></span></span></font><![endif]>Is it that mod_mono after a =
while
running not getting any request is restarted? And that is causing the =
problem? Because
each time I start mod_mono I have to manually change the permission of =
this
temporary file.<o:p></o:p></p>
<p class=3DMsoPlainText =
style=3D'margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 =
lfo1'><![if !supportLists]><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'><span
style=3D'mso-list:Ignore'>-<font size=3D1 face=3D"Times New Roman"><span
style=3D'font:7.0pt "Times New =
Roman"'>
</span></font></span></span></font><![endif]>If yes, how can I automate =
the
permission changing of /tmp/mod_mono_server<o:p></o:p></p>
<p class=3DMsoPlainText =
style=3D'margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 =
lfo1'><![if !supportLists]><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'><span
style=3D'mso-list:Ignore'>-<font size=3D1 face=3D"Times New Roman"><span
style=3D'font:7.0pt "Times New =
Roman"'>
</span></font></span></span></font><![endif]>Or is not mod_mono =
restarted, is
it just that this temporary file will be destroyed after a certain =
amount of
time and recreated when the next request comes?<o:p></o:p></p>
<p class=3DMsoPlainText =
style=3D'margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 =
lfo1'><![if !supportLists]><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'><span
style=3D'mso-list:Ignore'>-<font size=3D1 face=3D"Times New Roman"><span
style=3D'font:7.0pt "Times New =
Roman"'>
</span></font></span></span></font><![endif]>Or is this error message =
related
to something else, not to this tmp file?<o:p></o:p></p>
<p class=3DMsoPlainText =
style=3D'margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 =
lfo1'><![if !supportLists]><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'><span
style=3D'mso-list:Ignore'>-<font size=3D1 face=3D"Times New Roman"><span
style=3D'font:7.0pt "Times New =
Roman"'>
</span></font></span></span></font><![endif]>Or do I have something =
wrong in my
configuration (see below?)<o:p></o:p></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>Do you have any idea? Or advice? Or can you help me? =
<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
lang=3DDE
style=3D'font-size:10.0pt'>Thank you in =
advance!!<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
lang=3DDE
style=3D'font-size:10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
lang=3DDE
style=3D'font-size:10.0pt'>Barbara<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><b><font size=3D2 face=3D"Courier New"><span =
lang=3DDE
style=3D'font-size:10.0pt;font-weight:bold'><o:p> </o:p></span></fon=
t></b></p>
<p class=3DMsoPlainText><b><font size=3D2 face=3D"Courier New"><span =
lang=3DDE
style=3D'font-size:10.0pt;font-weight:bold'>My =
configuration:<o:p></o:p></span></font></b></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
lang=3DDE
style=3D'font-size:10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>Content of /etc/httpd/conf.d/mod_mono.conf =
:<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>LoadModule mono_module =
/usr/lib/httpd/modules/libmod_mono.so<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>Content of httpd.conf:<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>...<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><snip><o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>#<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'># Load config files from the config directory
"/etc/httpd/conf.d".<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>#<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>Include conf.d/*.conf<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'></snip><o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>...<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>...<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><snip><o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>Alias /ship =
"/usr/share/web/ship"<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>MonoApplications =
"/ship:/usr/share/web/ship"<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>  =
; =
&=
nbsp; &n=
bsp; &nb=
sp; &nbs=
p;  =
; =
&=
nbsp; &n=
bsp;
<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><Location /ship><o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'> AddHandler mono .aspx .ascx .asax .ashx .config .cs =
.asmx<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'></Location><o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'></snip><o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>...<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>...<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>When I start the web application:<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>[root@localhost web]# mono /usr/bin/mod-mono-server.exe =
--root
/usr/share/web/ship --applications =
/ship:/usr/share/web/ship<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>mod-mono-server<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>Adding applications =
'/ship:/usr/share/web/ship'...<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>Registering application:<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>
Host: =
any<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>
Port: =
any<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'> Virtual path: =
/ship/<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'> Physical path: =
/usr/share/web/ship<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>Listening on: /tmp/mod_mono_server<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>Root directory: /usr/share/web/ship<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>Hit Return to stop the server.<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>And:<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>[root@localhost web]# chmod 777 =
/tmp/mod_mono_server<o:p></o:p></span></font></p>
<p class=3DMsoPlainText><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:
10.0pt'>[root@localhost web]# service httpd =
restart<o:p></o:p></span></font></p>
</div>
</body>
</html>
------=_NextPart_000_0000_01C4B112.A81BD320--