ASP.NET: Idle time out vs Session time out

Definition of Idle Time out:

“Idle timeout limits helps conserve system resources by terminating unused worker processes by gracefully closing idle processes after a specified idle duration. This allows you to better manage the resources on particular computers when the processing load is heavy, when identified applications consistently fall into an idle state, or when new processing space is not available.”

The value for session time out can be retrieved from:

Open IIS | Properties on the App Pool you are using | Performance tab Here you will see a setting that says: “Shutdown worker processes after being idle for 20 (time in minutes)” where 20 is the default.

Session time out defines:

The Timeout property specifies the time-out period assigned to the Session object for the application, in minutes. If the user does not refresh or request a page within the time-out period, the session ends.

The value for idle time out can be retrieved from:

Using Web.config

Using IIS
You can get to the setting by: Open IIS | Properties on Web Site | ASP.NET tab | Edit Configuration… (or Edit Global Configuration to change for more than one site) | State Management tab.

The deciding factor for idle time out and session time out are in most situation to depends on Session Time out values. The reason being is, if the time out value configured for idle is 10 minutes whereas session time out is 30 minutes, when the last user accessing the web application have been left idle for 10 minutes, your application will get recycled. All user whom are connected will get disconnected even before the session timed out. It is recommended to configure the idle time out to be the same as session time out to avoid such problem.

There’s another timeout which requires equal attention:
Script Timeout
This is the maximum time an .aspx page can run before timing out. It can be set in two places. Either the web.config (or machine.config for all sites) or via code using Script.ScriptTimeout. If you have debug enabled in web.config then the Server.ScriptTimeout is set to 30000000 seconds (or 347.2 days). Otherwise the default is 90 seconds. This setting is most important if you have long requests that need processing like file uploads, etc. In general the defaults are probably ok.

Using the web.config
This sets the timeout to 3 minutes.

Using code
Server.ScriptTimeout

Using IIS
You can get to the setting by: Open IIS | Properties on Web Site | ASP.NET tab | Edit Configuration… (or Edit Global Configuration to change for more than one site) | Application tab.

Here you will see a textfield with a label that says “Request Execution timeout (seconds):” with a default value of 110 seconds.

IMPORTANT NOTE: Be sure to uncheck the “Enable debugging” checkbox next to this field, otherwise, the value will be ignored and set to the 30,000,000 seconds that debugging defaults to.

Written by admin on April 3rd, 2012 with no comments.
Read more articles on Programming and Web.

Expanding VMware hard disk size

I thought I have posted this previously. Now I hit this similar issue and requires the same command but could not find back my notes. Got to search around to refresh my memory. I’ll list them here now so anyone that needs it can use it:

*Make sure you have removed/commited all snapshots taken before proceeding.

1. vmware-vdiskmanager -x 20Gb “file location.vmdk”
*20Gb here refers to actual size of virtual disk that you want
2. Wait for the growing progress to complete
3. Boot up virtual machine
4. Execute diskpart on run (can be downloadable http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=23711).
5. Run List Disk to see Disks and esure there is free space
6. Run Select Disk for that Disk
7. Run List Volume to see Volume
8. Run Select Volume to Select Volume
9. Type Extend and got Success Message
10. Check disk size, it should be extended.

I kept a copy of diskpart on my local server: diskpart_setup. If you happened to face error of “DiskPart failed to extend the volume. Please make sure the volume is valid for extending. “, I’ll suggest you to get the diskpart from microsoft which is listed on step 4. If the link expired or file has been removed, you could get the copy I made on my local webhost.

Written by admin on March 24th, 2012 with no comments.
Read more articles on Software Review.

« Older articles

Newer articles »