Child pages
  • [deployment] Deploy script doesn't really reset all when Memcache enabled
Skip to end of metadata
Go to start of metadata

Consider following scenario:

  1. UserA adds a new class to a factory
  2. UserA does cache rebuild to make this class available in it's code
  3. UserA does commit
  4. UserB does update
  5. UserB does Deploy, which triggers same cache reset
  6. UserB sees a Fatal Error, that class isn't registered within a factory
  7. UserB does "Reset All Keys"
  8. all starts to work back again

Probably with Memcache enabled Deploy doesn't reset something related to new class additions and that causes a fatal error.

file_manager_check_folder_out_of_memory_fix.patch

Related Tasks

INP-1272 - Getting issue details... STATUS

3 Comments

  1. Same behavior also with memcache disabled (sad)

  2. This is going to be an issue for us. As you know we already experienced some issues in recent project so let's address it. Please create a task for 5.2.1

  3. After deep investigation of a problem it turned out to be completely unrelated to deployment script in general, but rather to the code, that was triggered by cache rebuild.

    Here is how cache rebuild works:

    1. somebody clicks on "Reset" / "Rebuild" button in "System Tools" section
    2. instead of deleting cache a flag is set indicating that cache is to be considered stale
    3. next website visitor trying to read the cache would notice a flag and will rebuild a cache
    4. while cache is being rebuild all other parallel visits will get stale cache version

    This approach prevents excessive server load, that In-Portal had in past, when cache was deleted for real and all visitors were rebuilding it in parallel.

    And what seemed as "cache not being rebuild" turned out to be following:

    1. user triggered a deploy
    2. stale cache flag set
    3. next page visit happens
    4. based on presence of stale cache flag a new cache is built
    5. during cache build an OnAfterConfigRead event is called for each registered unit
    6. one of units had a code in OnAfterConfigRead event, that caused infinite loop and caused "out of memory error"
    7. that all takes too long and stale cache flag is considered as expired and stale cache is marked as fresh cache without even being changed

    This is already bad, but it becomes worse knowing where infinite loop happened. In that project FileManager::CheckFolder method was called from OnAfterConfigRead event with following path given as input:

    /path/to/folder//

    These 2 trailing directory separators were preventing code, that determines parent folder of given one from doing anything and same path was given to next method and so on and so on.

     

    Solution: fix FileManager::CheckFolder method.