I've added extensions to my php.ini file and I need to restart my IIS server. Is it safe to re-start IIS? Will I lose any information or am I just being over-worried? All I need to do is open IIS Manager, select server, click "action" in the menu > View tasks and click restart IIS?
feedback
|
migrated from stackoverflow.com Jan 16 at 20:32
This question came from our site for professional and enthusiast programmers.
|
It would really depend on your definition of "safe". Will it break anything? It might if you haven't configured it correctly. However an IIS restart is usually quick and painless, it will break running sessions in most cases (.NET sessions). But really it depends on what is running and the dependencies. For the most part, an IIS restart is 'fine'. I guess that's the best answer I can give without knowing your full "safe" definition expectations. | |||||||||||
feedback
|
|
According to this Microsoft technet article
| |||||||||
feedback
|
|
An IISRESET (the command line tool designed to restart IIS) is a pretty severe action. You ask your web server to shut down, and if it does not manage to do so in a timely manner, the core service processes are killed and restarted sequentially. If you need to reload a specific site configuration, or reload an isolated application domain, issuing an IISRESET command is like cracking open a nut with a sledgehammer! First of all, all virtual memory held by the processes serving your applications is flushed. This means that all session data is lost and all users currently connected and authenticated on all websites on the server will experience that they have been logged off, or their shopping basket emptied, or whatever functionality that depends on temporarily stored data. Furthermore, if you force a restart of the web server, or the initial attempt to restart it gracefully times out, clients will experience a sudden loos of connectivity with any application hosted on the server. To get around these issues, the concept of worker process isolation that was introduced in IIS 6.0 can come in handy. If you want to reload application specific configuration files (eg. web.config), or just need an application that has crashed, deadlocked or experiences any other type of resource exhaustion to get back on top, try recycling the application pool serving your web application instead. Recycling an application pool is an overlapping recycling action which simply shuts down the W3 Worker Processes serving the application pool gracefully, that is: current requests will continue to execute until the queue is empty. In the mean time, the application pool is allowed to spawn a new worker process to serve subsequent requests, and the http driver re-routes all application requests to this new process. With this you can accomplish virtually no down time, while at the same time introduce configuration changes granularly and only affect the application you are reconfiguring and not all other applications This MSDN Blog Post explains some of this rather nicely | |||||
feedback
|
|
If you don't know what behaviour to expect when you preform an IISRESET or even a server restart then you absolutely need to find out! There are going to be many occasions where you'll need to reset your website or the server, patches and upgrades, unscheduled downtime, issues with the environment such as power failure and you'll need to be confident that such a restart will set your site back to a known and stable state. So in answer to the question, yes, restart is safe in that the server will restart your application and as Jakob points out this won't effect the MySQL databases. How your application deals with a restart will depend on how the site has been developed. I'd also recommend restarting the MySQL engine (after taking full backups of course) to ensure your site works as expected afterwards. | |||
|
feedback
|