[Mono-list] Apache restarts required to avoid whitescreens
robertj at gmx.net
Tue Feb 19 17:16:43 EST 2008
> However, I have to gracefully restart Apache between morning and lunch or
> else (on busier days) lunchtime web pages start to just whitescreen (and
> load after a minute or so). Button presses which are supposed to action
> database inserts appear to work but the inserts don't happen. With the
> restart at 11.30 this never happens. However, users get logged out and the
> root of the problem isn't getting sorted.
You should make your application restartable first. Then you can
examine/log/trace your app w/out being under pressure.
Users are logged out because the view and session states are lost
when mono is going down. To prevent this, add the following settings
to web.config under <system.web>:
1. Preset validation keys for the view state:
The keys must be randomly chosen, of course.
2.1 Setup persistent session state (ASP.NET 1.1)
You need this only if your application is using the "Session" object.
sqlConnectionString="database connection string"
sqlConnectionString must be a valid DB connection string.
The database must provide a table containing these fields (MySQL
CREATE TABLE `ASPStateTempSessions` (
`SessionId` char(32) NOT NULL,
`AppPath` char(128) NOT NULL,
`Created` datetime NOT NULL,
`Expires` datetime NOT NULL,
`Timeout` int NOT NULL,
PRIMARY KEY (`SessionId`)
Additionally to the <sessionState> settings, you have to setup
the session state module. This is Mono specific, as MS does not
support other providers than MS SQL:
<!-- tell SqlSessionStateModule which DB provider to use -->
<!-- Adjust the assembly name according to your
MySQL Connector version! -->
<add key="StateDBProviderAssembly" value="MySql.Data,
Version=184.108.40.206073, Culture=neutral, PublicKeyToken=8e323390df8d9ed4" />
<!-- the connection type of the provider -->
<!-- parameter placeholder/prefix (MySQL: "?") -->
<add key="StateDBParamPrefix" value="?" />
2.2 Setup persistent session state (ASP.NET 2.0)
Unfortunately I don't know if the session state module
for Mono's ASP.NET 2.0 is complete/working. I'll have a look
at its state if nobody else will reply.
More information about the Mono-list