Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Cassini Service stops unexpectedly
Guest
#1 Posted : Monday, June 19, 2006 4:26:02 PM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Hi,

I installed the latest version of Cassini 2.0 (RC1) about 2 weeks ago, and it was working fine. Just for the record, I also have MS SQL server 2005 express installed. About two days ago, I started having problems; Cassini stops randomly, and even when it's running, I can't get to the Cassini explorer page. I don't know if there's any connection, but it stopped working the first time I tried it after installing SQL. To my knowledge, there are no serious problems with my computer (definitely no viruses -or is it "viri"? :), however, IIS wouldn't work properly either. Any ideas?

~Jeff
Ultidev Team
#2 Posted : Monday, June 19, 2006 4:44:10 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi, Jeff.

Could you please look at the EventLog to see if there's anything "interesting" there? We had no problem runnign SQL '05 Express with Cassini on the same box. But you said even IIS is not OK... That is not a good sign for overall system's health.

Regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Guest
#3 Posted : Tuesday, June 20, 2006 12:41:44 PM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Some stuff I forgot to mention:
-the problem with IIS was that it couldn't start the website itself in what MS calls "a timely fashion" :) - not usual error msg lingo
-the other weird thing is that shortly after I restarted the Cassini service, a process called "DW20.exe" would start up and promptly go up to high 90s in the processor usage column of taskmgr

hope this helps [you help me]...

~Jeff
Ultidev Team
#4 Posted : Tuesday, June 20, 2006 12:56:26 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi, Jeff.

Something is not right, either with your system, or, more likely with the web app you are trying to run, if IIS cannot start it in timely manner. Please look at the windows event log - it likely has relevant error information.

DW20.exe is the utility that gathers the crash information for sending it ot MS.

Regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Guest
#5 Posted : Wednesday, June 21, 2006 12:07:39 PM(UTC)
Groups:
Joined: 11/1/2005(UTC)
Posts: 278

Thanx for the help - it appears to be working fine now. I don't know if this caused it, or if it was just a figurative hiccup, but I'd messed with some settings, and turned off a few things by accident (oops!).
BrightSoul
#6 Posted : Tuesday, October 28, 2008 12:53:08 AM(UTC)
Groups: Member
Joined: 10/26/2006(UTC)
Posts: 6
Location: Italy

Hello,

first I want to thank you for such a good and versatile webserver.
Then, I would also report that I've been experiencing the DW20.exe problem as well for a few months.

I have a rather big asp.net 2.0 application which works good on a Windows 2000 machine. When I make changes to it and upload the new .cs files to the production machine, it gets recompiled by IIS5 just fine and everything works as expected.

On the local side though, when I test it under Cassini webserver, I notice there are problems under recompilation. The cassini service suddenly stops, and I see this process DW20.exe showing up in the Task Manager. It usually takes about 90% of the CPU and will never terminate on its own. I have to stop it and restart the Cassini service which will crash a couple more times before it can actually show my application in the browser. After a few retries, however, it manages to recompile and run the application.

The application features httphandlers, a connection to a mysql database, form based authentication - ie. regular stuff, nothing exotic.

Last week I had to reinstall XP professional SP2 on the local machina but, even thought I formatted and installed the latest version of the webserver, the problem is still there.
I'm developing the application with Visual Web Developer Express SP1, if that matters.

You can find here my application.evt and system.evt. // Links removed by moderator to protect your private information

Any suggestions?
Thank you in advance.



UPDATE: Now it's crashing after a few minutes, even when not recompiling my application.

12:21 I restart the Cassini service
12:22 I visit a page of my application, it loads fine.
12:26 Without doing anything (I was just watching my LCD), the service crashes after 4 minutes.

Here's application2.evt and system2.evt // Links removed by moderator to protect your private information

I don't know what the problem could be.
Ultidev Team
#7 Posted : Tuesday, October 28, 2008 4:44:54 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi!

Thank you for your positive feedback about our little UltiDev Cassini Web Server.
Special thanks for providing detailed information about the issue you are having - our job of helping developers would be much easier if everyone was as diligent as you are when reporting problems.

We have downloaded and analyzed event log files - thank you for supplying them, they were very useful. It looks like we are dealing with two separate problems.

First one, "SocketException: Di norma è consentito un solo utilizzo di ogni indirizzo di socket (protocollo/indirizzo di rete/porta)", may not have occured when you uploaded new .cs file. We see this problem sometimes when either service gets restarted, or when applications get reloaded due to applications' configuration change (usually when an application is either registered or unregistered). This problem is seen most often on slower computers. It's a timing issue related to TCP ports not being released by the system even though we closed and shutdown the socket. We intend to work around this issue in the future version, but today restarting a service in a minute or so after this error should bring applications back up - just as your log indicates they did (see "Successfully started Cassini web application" entries after the error).

Second problem is a bit more of a mystery. As you can see in the log, UltiDev Cassini server is crashed by misbehaving application:
Code:
Exception: System.ArgumentNullException
Message: Il valore non può essere null.
Nome parametro: type
StackTrace: in System.Reflection.Assembly.GetAssembly(Type type)
in Interconsult.Engine.Config.DoJobs(Object sender) in f:\Webapps\businessfindershop_www\App_Code\Engine\Config.cs:riga 100
in System.Threading._TimerCallback.TimerCallback_Context(Object state)

Maybe the Interconsult.Engine assembly in not in the Bin folder? Could you please verify that?

Please let us know what you find.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
BrightSoul
#8 Posted : Tuesday, October 28, 2008 6:11:20 AM(UTC)
Groups: Member
Joined: 10/26/2006(UTC)
Posts: 6
Location: Italy

Thank you for your quick reply, I'm glad to see you're working hard to develop an even better webserver.

For the second problem:

Quote:
Maybe the Interconsult.Engine assembly in not in the Bin folder? Could you please verify that?


Yes, the code in that namespace is in the App_Code folder and gets compiled at the first page request. Even though this was not the problem, thanks to your suggestion I was able to pinpoint the cause, which was in MY code after all ;) Under some circustances, some code I put into Application_Start in global.asax would throw an exception. It's basically a timer which checks jobs to do every a few minutes.

As Microsoft explains here:
http://support.microsoft.com/?scid=kb%3Ben-us%3B911816&x=9&y=14

Quote:

Unhandled exceptions outside the context of a request, such as exceptions on a timer thread or in a callback function, cause the worker process to end.


The faulty code, being executed at Application_Start, is indeed out of context and that's why asp.net stopped. Silly me, I should have realized this earlier, even IIS 5.1 stops working when that happens. In that case IIS shows an "Application not available" page, I wonder if Cassini could keep running even on such events, so you're not forced to restart the service.

Also, I was misled into thinking the problem was with Cassini by the fact that on the production server the app is working ok, but just because I found later that legacyUnhandledExceptionPolicy was set to True in the Aspnet.config file.

Until I'll fix the problem, I've set legacyUnhandledExceptionPolicy=True also on my local computer. IIS is now ignoring the unhandled exception, but Cassini is not :/ It still crashes after a few minutes, whenever the faulty code goes to execution.

Many thanks for your support :)
Ultidev Team
#9 Posted : Tuesday, October 28, 2008 7:25:13 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

Well, it's true that application code executed outside of the request processing context is the most dangerous place for an application to fail - it indeed will take our web server with it. Nonetheless, we have logged this as a bug and will try to address this in the next release. Thank you for providing the link to MS knowledge base article - it will be useful in reproducing the issue.

One thing we could suggest is to move the code that executed scheduled jobs from the web application to either a windows service, or better yet, to a simple EXE that is kicked off by windows task scheduler [1], [2].

Thank you again for great-quality feedback and research. You definitely helped us and the community.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
yosefdov
#10 Posted : Monday, August 2, 2010 6:01:46 PM(UTC)
Groups: Member
Joined: 8/2/2010(UTC)
Posts: 2

Check http://forums.asp.net/t/1011731.aspx - you need to increase your log size.
Ultidev Team
#11 Posted : Tuesday, August 3, 2010 4:41:00 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

Thank you much for the suggestion. We'll double-check this but when UltiDev Cassini gets installed, it does adjust the settings of the Event Log to ensure it does not run out of space.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Rss Feed  Atom Feed
Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.