I have a win2012 server. I remote desktop into it. I have setup my http server, php, mysql, etc.. Everything works fine.

But at some point, usually 10-15 mins or so, the http server stops working. Logging in and restarting the http server and everything works again.

I believe the issue is that when I run certain processes(mainly php-cgi.exe, as that is the one that goes missing from the process view, although not sure why http stops working completely) they are shut down by windows.

I'm a bit confused on how windows deal with the sessions.

I know that a new session is created for each RDT login. I've tried to have windows autolog in the admin account as to run some scripts on startup that start the http server but this doesn't work well.

If I run my script that starts the http server, php, mysql, etc are these processes terminated when the RDT is terminated or times out? (it seems like this is the case).

If so, how do I properly run process that I want to have started when the server starts and not terminate unless I explicitly make it happen?

(BTW, I don't see any mention of issues in the event log or other logs)

I see the processes are in either session 1 or session 2 and my guess is that they need to be ran in session 0? (since session n > 0 will eventually time out or terminate?)


In Windows Server 2012, all the old terminal service configurations tools has gone or deprecated as Microsoft says so. Related question on tsconfig/tsadmin.

In your case, when you set your http/php/mysql after rdp to it or even run your scripts, you will be using the default Remote Desktop Services config that has a 15 minutes timeout.

You need to install this new role "Remote Desktop Services", here a guide from technet blog to get you started.

  • I don't follow if this addresses my issue or not. Are you saying that somewhere in the role "Remote Desktop Services" there is the ability to run apps in session 0? (I've tried installing various things but haven't seen anything that looks remotely what I need... and I end up getting some licensing issue with remote desktop services). – Archival Apr 10 '13 at 7:19
  • @archival in Windows 2012, by default the "remote desktop services" is not configured - although you can rdp to it but with a 15 minutes default timeout. So you need to install and set that role - to increase the timeout value. – Muhammad Apr 22 '13 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.