Announcement

Collapse
No announcement yet.

Error while clearing cache Code 500 - Creating Fields

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error while clearing cache Code 500 - Creating Fields

    I am getting constant errors trying to create a field of any type in any entity.

    I found this in the Espo Logs constantly repeating..... Any idea? I have already tried clearing my cache via the Espo interface and Clearing my browser cache too.


    [2017-11-14 16:53:58] Espo.WARNING: E_WARNING: unlink(data/cache\application\metadata.php): Resource temporarily unavailable {"code":2,"message":"unlink(data/cache\\application\\metadata.php): Resource temporarily unavailable","file":"C:\\xampp\\htdocs\\espocrm\\a pplication\\Espo\\Core\\Utils\\File\\Manager.php", "line":594,"context":{"dirPath":"data/cache\\application","removeWithDir":true,"fileList ":["acl","autoload.php","cronLastRunTime.php","entryP oints.php","hooks.php","jobs.php","languages","met adata.php","modules.php","ormMetadata.php","routes .php","services.php"],"result":1,"file":"metadata.php","fullPath":"d ata/cache\\application\\metadata.php"}} []
    [2017-11-14 16:53:58] Espo.WARNING: E_WARNING: rmdir(data/cache\application): Directory not empty {"code":2,"message":"rmdir(data/cache\\application): Directory not empty","file":"C:\\xampp\\htdocs\\espocrm\\applica tion\\Espo\\Core\\Utils\\File\\Manager.php","line" :536,"context":{"dirPaths":["data/cache\\application"],"result":true,"dirPath":"data/cache\\application"}} []
    [2017-11-14 16:54:02] Espo.ERROR: API [POST]:/Admin/fieldManager/:scope, Params:Array ( [scope] => Account ) , InputData: {"type":"varchar","required":false,"trim":true,"dy namicLogicVisible":null,"dynamicLogicRequired":nul l,"dynamicLogicReadOnly":null,"name":"wtn5","label ":"WTN5","maxLength":40,"tooltipText":"","default" :"","audited":false,"readOnly":false,"tooltip":fal se} - Error while clearing cache [] []
    [2017-11-14 16:54:02] Espo.ERROR: Display Error: Error while clearing cache, Code: 500 URL: /espocrm/api/v1/Admin/fieldManager/Account [] []

  • #2
    Hello

    On github you can find a pull request. I hope this will help https://github.com/espocrm/espocrm/pull/694/files
    I am waiting on your answer.

    Thanks

    Comment


    • #3
      I modified application/Espo/Core/Utils/Util.php
      I don't have the following directory on my espo installation tests/unit/Espo/Core/Utils/UtilTest.php
      Do I just create the file in the same directory as Util.php?
      Once completed how do I run this?

      Comment


      • #4
        You don't need to run tests.
        Go to Administration > Rebuild.
        After that you could the the log, if everything is ok. And also check, if everything works well

        Comment


        • #5
          Seems to be working better now with less errors.

          Comment


          • #6
            Wow what a great support.
            Thank you so much for the information.

            Comment


            • #7
              The problem appears to have gotten worse..... I get this doing almost any administrative task and idk why.

              "Resource temporarily unavailable" & "Directory not empty"


              [2018-02-03 16:17:22] Espo.WARNING: E_WARNING: unlink(data/cache\application\ormMetadata.php): Resource temporarily unavailable {"code":2,"message":"unlink(data/cache\\application\\ormMetadata.php): Resource temporarily unavailable","file":"C:\\xampp\\htdocs\\espocrm\\a pplication\\Espo\\Core\\Utils\\File\\Manager.php", "line":594,"context":{"dirPath":"data/cache\\application","removeWithDir":true,"fileList ":["acl","autoload.php","hooks.php","metadata.php ","m odules.php","ormMetadata.php","routes.php","servic es.php"],"result":1,"file":"ormMetadata.php","fullPath" :"d ata/cache\\application\\ormMetadata.php"}} []
              [2018-02-03 16:17:22] Espo.WARNING: E_WARNING: rmdir(data/cache\application): Directory not empty {"code":2,"message":"rmdir(data/cache\\application): Directory not empty","file":"C:\\xampp\\htdocs\\espocrm\\applica tion\\Espo\\Core\\Utils\\File\\Manager.php","line" :536,"context":{"dirPaths":["data/cache\\application"],"result":true,"dirPath":"data/cache\\application"}} []
              [2018-02-03 16:17:22] Espo.ERROR: API [POST]:/Admin/clearCache, Params:Array ( ) , InputData: - Error while clearing cache [] []
              [2018-02-03 16:17:22] Espo.ERROR: Display Error: Error while clearing cache, Code: 500 URL: /espocrm/api/v1/Admin/clearCache [] []

              Comment


              • #8
                Hi,

                Did you try to clean up all contents of data/cache directory manually?

                Comment


                • #9
                  It could be something Windows specific, like file permissions. Must admit, I'm not a specialist in Windows.
                  Last edited by yuri; 02-03-2018, 08:45 PM.

                  Comment


                  • khopper
                    khopper commented
                    Editing a comment
                    It clears the cache just fine but still throws up the error. It is not a file permissions issue.

                • #10
                  Manually deleting ./data/cache solved on linux

                  Comment

                  Working...
                  X