Developer forum

Forum » CMS - Standard features » Slow app startup due to casting exceptions

Slow app startup due to casting exceptions

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

On a site with around 2000 users, I am seeing a very slow startup when debugging. I tracked the issue down to this in Fill in User.vb:

StockLocationID = Base.ChkLong(reader("AccessUserStockLocationID"))

The column AccessUserStockLocationID is nullable in the database (and contains null for all users). When the app starts it's firing hundreds of queries (looks like one for each user) against this table. ChkLong then crashes saying that DBNull.Value can't be cast to a long. Shouldn't Fill or ChkLong check for DBNull.Value instead of raising an exception when casting fails?

I manually updated all users and set AccessUserStockLocationID to 0 and then the problem goes away.

Thanks,

Imar


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Good find. We will address the issue.

Thanks, Nicolai

Votes for this answer: 1
 
Oleg Rodionov
Reply
This post has been marked as an answer

Hi all,

New TFS 26458 has been created against the issue, will be fixed on nearest hotfix\release.

BR, Oleg QA

Votes for this answer: 1
 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Imar

The problem TFS#26458 & #28791 "Slow app startup due to casting exceptions" has now been fixed in version 8.9.1.5

You are able to find this build in the download section:

http://doc.dynamicweb.com/releases-and-downloads/releases

Please contact Dynamicweb Support if you need any additional help regarding this.

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

You must be logged in to post in the forum