Jeremy Davis's picture

If it definitely appears to be directly related to the length of time that the LAMP has been running, my immediate guess is RAM leakage somewhere. But I'm only guessing...

Assuming that you mean log in via SSH, then a better way to properly diasnose what the issue is, would be to make the inital SSH connection really verbose. Then you'll see what part of the process is causing the delay. Hopefully that might make the next steps of what to look at, a bit easier (rather than just jumping to random conclusions like I often do! :). I'm not sure how you'd do that from Windows (using PuTTY for example) and I'm not 100% sure for MacOSX either (although 'ssh --help' might head you in the right direction). But I know connecting from Linux, using the '-v' switch with ssh will make it really verbose. E.g.:

ssh -v root@YOUR_SERVER

If you can't work out how to do that from your OS (and you're not running Linux as a desktop) then possibly the easiest way would be to set up a local TurnKey Core VM and ssh into that first, then ssh -v from that, into the problematic server.

Then you should see where the connection is stalling. Hopefully that will give you insight into where the real issue may be.

Monitoring resources is another angle which may be worth consideration. Webmin has a resource usage dashboard which may help, plus all TurnKey servers include Monit. Monit has a webUI, but we disable it by default as our default config is pretty simple and we don't believe it adds a ton of value. So it may be worth re-enabling that as an easy way of checking resource usage? To re-enable the webUI, edit and uncomment the line `set httpd port 2812 and` and also one of the other lines (likely 'allow admin:monit`). Then restart monit.

Hope those ideas head you on the right track. Please share what you learn, as perhaps there's something that TurnKey could be doing better/differently to improve the user experience.