New Custom Module get Timeout exception while running

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
4/30/2010 3:11:26 AM
Gravatar
Total Posts 39

New Custom Module get Timeout exception while running

Can anyone help try to figure out why this erro might occur?

The error occurs on my development machine (Windows 2003 SP2). The page the error occurs on contains I custom module I am developing and a HTML Content module. I am running client side javascript when the error occurs.

My Custom Module is going to be a gallery. At the moment I am focused on layout. I have not yet added any calls to the database. So far I have stubbed out the code using CodeSmith, developed the setup and copied in some example code based on this example: http://www.twospy.com/galleriffic/example-5.html

So it is using javascript. The page runs OK, but after click next a couple dozen times I get the error.


 

The last time I updated from SVN was just after the last patch.

 

Message:  An unhandled exception occurred and the process was terminated.

Exception: System.Data.SqlClient.SqlException

Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Call stack

> mojoPortal.Data.DLL!mojoPortal.Data.SqlHelper.ExecuteReader(string connectionString = "Integrated Security=true;Initial Catalog=mojo01;Data Source=(local);server=(local);database=mojo01", System.Data.CommandType commandType = StoredProcedure, string commandText = "mp_TaskQueue_SelectIncomplete", System.Data.SqlClient.SqlParameter[] commandParameters = null) Line 133 C#
mojoPortal.Data.DLL!mojoPortal.Data.DBTaskQueue.GetUnfinished() Line 348 + 0x1d bytes C#
mojoPortal.Business.DLL!mojoPortal.Business.TaskQueue.GetUnfinished() Line 457 + 0x5 bytes C#
mojoPortal.Web.DLL!mojoPortal.Web.WebTaskManager.RunTask() Line 263 + 0xb bytes C#
mojoPortal.Web.DLL!mojoPortal.Web.WebTaskManager.RunTaskOnNewThread(object oTask = {mojoPortal.Web.WebTaskManager}) Line 245 + 0xa bytes C#
 

 

Thanks,

Leah

4/30/2010 7:18:50 AM
Gravatar
Total Posts 18439

Re: New Custom Module get Timeout exception while running

Hi Leah,

I would take a look under Administration > Advanced Tools > Task Queue

are there lots of old tasks there or under task queue history? If so I would delete them.

Hope it helps,

Joe

4/30/2010 6:10:10 PM
Gravatar
Total Posts 39

Re: New Custom Module get Timeout exception while running

Hi Joe,

Thanks for the idea but it says no tasks are running. Can I turn it off if I don't need to use it?

 

I was wondering if my javascript might be clashing with something? Like could I be clashing with a namespace somewhere.

The jquery component was using an id that mojoportal uses in its HTML. I have changed that and can look for others.

 

Cheers,
Leah

5/1/2010 12:12:12 PM
Gravatar
Total Posts 18439

Re: New Custom Module get Timeout exception while running

Hi Leah,

The error indicates a timeout when selecting unprocessed task rows from the database so my first thought was maybe there are lots of rows but this does not seem to be the case. You could try running Exec mp_TaskQueue_SelectIncomplete from query analyzer and see if it runs fast or slow from there.

I notice you are using a connection string with integrated security which means it is using a windows user not a sql user. If possible I recommend use a sql user. The tasks run on a background thread so I'm wondering if the background thread doesn't have the same windows user context as threads that execute web requests then maybe it can't connect to the db. 

You could disable the TaskQueue with <add key="DisableTaskQueue" value="true" /> but then your search index won't get populated, newsletters won't send and lots of other little tasks that run from our WebTaskManager would no longer do their jobs.

Hope it helps,

Joe

5/2/2010 5:19:02 PM
Gravatar
Total Posts 39

Re: New Custom Module get Timeout exception while running

Hi Joe,

Fixed (ish)!

After more testing I found that the problem occurs only in Firefox and only when firebug is enabled. So I think there is some clash with the javascript.

Running running Exec mp_TaskQueue_SelectIncomplete showed only:
       App Keep Alive Task
       WebTaskManager

Other database queries were working so hadn't thought that the database connection might be an issue. I will change to use a sql user to connect to the database.

It seems to me that the error was occuring because my environment had grown unstable after getting a few exceptions during custom module development. Making the Timeout exception one of those errors that is not directly connected to the cause. I will keep an eye on it.

 

Thanks again for your help.

Cheers,
Leah

You must sign in to post in the forums. This thread is closed to new posts.