Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Site speed, recompile, remember me View modes: 
User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 1/25/2012 11:32:53 PM
   
Site speed, recompile, remember me
I'm using the default login webpart and have had several users complain because it is not remembering them after they check the box and log in. They also state they don't even click the log out button either.

I've also noticed it sometimes takes nearly 5 minutes before I can access the CMSDesk. It's like it recompiles the whole site again because something changes in the web.config or app_code folder. i've got a keep alive webpart on the master page and it works well to keep the site up and running quickly but the CMSDesk and CMSSiteManager take forever to get running.

Could the Keep alive or accessing the CMSDesk or CMSSiteManager be causing the problem with remembering the user? And why does it take so long for the CMSDesk to load?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/26/2012 1:17:04 AM
   
RE:Site speed, recompile, remember me
Hi,

1. Remember me - using this option the system creates a cookie in the browser, however, if the user closes the browser and the browser is set to clear cookies on exit - it won't work. Also, if the cookies are manually deleted. Could you please check this with your users?

2. Recompilation - yes, when you do this kind of changes, .Net is restarting the application and it is being compiled. Please see this article
This should not have any impact on the remember me since it is ensured via cookies on the client.

Best regards,
Juraj Ondrus

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 1/26/2012 2:12:39 PM
   
RE:Site speed, recompile, remember me
Thanks Jurajo for the info and I expected those would have been your answers. No response from users yet but it works fine from me so I'm assuming they have something like that set to clear/delete cookies.

As far as recompilation, I'm not making any changes to any of those places. I log into the CMSDesk and it takes literally 1 - 5 minutes to load. I make a content change on a page or two and save them and log out. I then log back in a minute, 30 minutes or a day later and again it takes between 1 - 5 minutes to load the CMSDesk. As I move through the CMSDesk if I have not been to an area sometimes it takes nearly 1 - 2 minutes for that area to load. For instance if I start in CMSDesk and go to Administration>Users, Administration will come up in 1 - 2 minutes, then when I click on Users, it takes 1 - 2 minutes to load. But if I were to go back there it loads almost immediatelly. I'd be happy to create a special kentico login if someone from Support were to take a look. We do have support on the site. I'm guessing this could be partially to blame because I have a shared hosting account but I'd like to think it has nothing to do with it.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/27/2012 1:18:50 AM
   
RE:Site speed, recompile, remember me
Hi,

I got it wrong your first post - I thought you are doing those changes.

Anyway, could you please check Site Manager -> Administration -> Event log? I guess there will be plenty of warnings or exceptions "Application_end" - could you please check and post the details here?

It seems to me that the application is being restarted very often. Maybe because it is being killed by the environment. This happens e.g. when the application pool settings in IIS are set to some idle time, CPU or memory usage limits. Could you please check them?

Best regards,
Juraj Ondrus

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 1/29/2012 10:41:47 PM
   
RE:Site speed, recompile, remember me
Unfortunately, I'm unable to check the app pool settings as I'm in a shared hosting environment and don't have direct access to it. As I mentioned once I access that area 1 time I'm able to access it without delay the second and further subsequent times until I log out, close my browser, open a new browser window and log back in again. Seems very odd.

I also did some testing this past weekend and was able to get reproduce what others are having problems with as far as the "remember me" feature. I logged in and clicked remember me then navigated around for a bit, closed my window (without logging out) and went back 5 minutes later without a problem. But when I did the same and went back after 2, 4 and 8 hours I had to log back in again.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 2/2/2012 8:19:36 PM
   
RE:Site speed, recompile, remember me
Any thoughts as to why the remember me feature isn't working as expected?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/13/2012 2:25:18 AM
   
RE:Site speed, recompile, remember me
Hi,

I did some research on Google regarding this and here is the conclusion:

The .ASPXFormAuth cookie is being set to expire a year from the creation date when the remember me setting is being used. However when a user returns to the site, they are not remembered even though the cookie has been set correctly, even in different browsers.

For example: The cookie is set when the user logs in and checks "remember me". This cookie is set to expire one year from the creation date, but only persists for some amount of time (but not a year) then when the user goes back to the site, they are forced to re-authenticate like the cookie never existed. In this case, the issue is not being caused by the user’s browser, instead this is coming from IIS. If the application pool for the site is recycled or restarted, the values stored for these authentication cookies are lost on the server side.
To prevent this from happening you can hardcode the MachineKey setting in your web.config file: http://msdn.microsoft.com/en-us/library/ff649308.aspx. This setting will allow the application pool for your site to recycled or restarted and still maintain the values for the authentication cookies.
You can generate a machine key here.

Best regards,
Juraj Ondrus

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 2/14/2012 8:44:22 PM
   
RE:Site speed, recompile, remember me
Thanks for the info Juraj. I did get that same info from Edward in the Support area and was able to get it working properly with that. I did suggest he maybe add that as a KB article as it would be good info for someone to add (I forgot about it all together).

Also, any reason it takes so long for the CmsDesk and other modules to load? Still haven't solved that problem yet. Nothing that I know of changes in the App_Code or web.config files.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/15/2012 1:41:32 AM
   
RE:Site speed, recompile, remember me
Hi,

The KB article is being prepared right now. It will be available soon.

Regarding the loading of the CMS Desk - in the editing part, no caching is used so it takes longer to load the content. However, if you are visiting the user interface for the first time after the restart, everything is being loaded and so on. What are the loading times on second, third visit or refresh?

Best regards,
Juraj Ondrus

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 2/15/2012 9:11:04 PM
   
RE:Site speed, recompile, remember me
When I load the CMSDesk the first time it takes roughly 1-4 minutes, every time after, nearly immediate. When I go to the Administrator tab to look at users, same thing, roughly 1-4 minutes but nearly immediate on the 2nd and 3rd clicks.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/16/2012 2:16:50 AM
   
RE:Site speed, recompile, remember me
Hi,

The first load of given page/section after the application start is slower - however, on my computer it takes up to one minute (unless I have re-compiled the whole web site in VS - than it takes much longer :-)).

Is the CMS running on your local machine or are you connecting to some server? There might be also some delay in the network connection.

Best way would be to keep the application alive so it is not restarted that often and then the pages in the UI will load faster.

Best regards,
Juraj Ondrus

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 2/17/2012 11:36:32 AM
   
RE:Site speed, recompile, remember me
I believe this was mentioned earlier in this thread, but you're going to see slow response times every time the application has to recompile the App_Code and code behind files. It compiles the code behind files as those user controls and pages are accessed, which is why it takes a long time to load CMSDesk the first time and is fast after that, but then when you load the Administrator tab the first time it takes a long time. It's because the controls in the administrator tab hadn't been compiled yet.

If the application pool for your website shuts down due to inactivity, when you access the site again it will trigger the application pool to start and it has to compile everything again and load everything back into cache.

The application pool can shut down or restart for several reasons. The most common reason is due to inactivity, meaning that nobody has accessed the website during the amount of time the application pool is configured to stay active with no activity. Another common reason it will restart is when it's private memory limit has been reached. By default, private memory is unlimited for the application. However, if you are hosting your site on DiscountASP.NET, for instance, the limit is usually 100MB, which is quite low for a site running Kentico CMS. That would cause the application pool to restart very often.

For more help, please answer Mihal's question. Where/how are you hosting your site? Are you running it in Visual Studio's Cassini web host, or in IIS 6 or 7? Are you hosting it on a VPS or Dedicated server where you have full control over the settings or on shared hosting like DiscountASP.NET?

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 2/17/2012 11:46:36 AM
   
RE:Site speed, recompile, remember me
Shared hosting is with GoDaddy.com with IIS7 and .NET 4.0. Wish the client had the money for a dedicated server but unfortunately not. I understand why it takes so long to load, just not why the app pool shuts down so often. I've purposely sat on the website making a request at least every 10 minutes for at least 4 hours and have had the app pool cycle 5 times. So I'm wondering if GoDaddy has it set to automatically recycle no matter what the activity is or has been. Just one more reason to get dedicated hosting... Unfortunately, I only have access to change the IIS version, the .NET runtime version and the pipeline mode, nothing else.

I do have the KeepAlive webpart on my master page thinking that would help but evidently not.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/18/2012 4:47:50 AM
   
RE:Site speed, recompile, remember me
Hi,

Could you please check with GoDaddy support if they can see in their logs the reason why your application is recycled? I suspect because some memory or CPU usage is exceeded or, they are just recycling everything after some time...

Best regards,
Juraj Ondrus