How to avoid your web application crashing during file replacement?

Say you have a large web application with lots of visits, but you don’t want your application to crash and you don’t want people to see php or mysql errors that occur when replacing files using FTP. How to avoid what? How easy is it to execute the old version of the file until the replacement is completed?

thank

+3
source share
3 answers

You can follow at least one of two rules:

  • Use accelerators (e.g. APC) with time verification disabled. so until you clear the cache manually, older versions will be used from memory
  • , : , yout /home/project/www. /home/project/public_html - - www. - /home/project/www 2, , , . - .
+2

git - , -. , . , , .

. , ( , )/

, . , . , , git . - .

SVN,.svn, , . , , .

+1

. app.old ,

Note that this should work fine on Unix environments. It will also work only if all of the directories listed above are on the same file systems. In rare cases, users may see 404 error if they get into the application after you rename the source application to .old and before renaming temp dir to the directory of the source application.

0
source

Source: https://habr.com/ru/post/1743909/


All Articles