c# - Why is my ASP.NET site acting single threaded? -


i have asp.net site running in iis i've noticed seems run slow if 1 page slow, set test see if running if single thread (i.e. if 1 page request running, others must wait). created simple page (no master page, has default aspx code except added literal dump debug code into) code read current time, sleep 10 seconds, , exit, so:

protected void page_load(object sender, eventargs e) {     datetime = datetime.now;     system.threading.thread.sleep(10000);              literal1.text = now.toshortdatestring() + " " + now.toshorttimestring() + " " + now.second + ":" + now.millisecond; } 

i open page in 2 different tabs @ same time. timestamp on each tab 10 seconds apart, seems me mean second page request blocked , waits until first 1 completes before running.

i tried commenting out http modules in web.config , disabling code in global.asax, still see issue.

this sounds session state issue.

access asp.net session state exclusive per session, means if 2 different users make concurrent requests, access each separate session granted concurrently. however, if 2 concurrent requests made same session (by using same sessionid value), first request gets exclusive access session information. second request executes after first request finished. [...]

source: asp.net session state overview

try disabling session state in web.config (or mark readonly) confirm indeed issue, or use 2 different browsers (which gets different sessions).


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -