Announcement

Collapse
No announcement yet.

to many executions with espocrm

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

  • to many executions with espocrm

    Hi,
    i start to get from my hosting many complains about espocrm that use many executions (10151 ).
    The executions for your account for the last 24 hours are as follows:
    10151 /home/public_html/crm/api/v1/index.php

    we are 3 users that not use namy times in day the espocrm.

    in the account we you wordpress multisite with 70 website and the admin-ajax.php gets at last 3900 executions.

    what can be the problem here?

  • #2
    The page executions depends on time and number of opened tabs with EspoCRM in your browser. EspoCRM is a single page application, https://en.wikipedia.org/wiki/Single-page_application. So, all data is loading via ajax.
    In the era of modern technologies such hosting restrictions are unacceptable.
    Job Offers and Requests

    Comment


    • #3
      Hi you are right and that why i write we don't use EspoCRM many times in day.
      lets say we enter to see our task and update the tasks status and etc...

      its about 20 times in day we open EspoCRM for all 3 users.

      so i don't think it's possible to get 10151 executions in 24h am i right?

      where can i check this in EspoCRM?

      Comment


      • #4
        If you open just 20 times, it is not possible to get 10151 executions. Let figure out the problem. I will create a script to log every call to api/v1/index.php. I will send it soon.
        Job Offers and Requests

        Comment


        • #5
          Great waiting!

          Comment


          • #6
            I have created a code to log every execution. Please add the code to /api/v1/index.php between lines 25-26:
            PHP Code:
            $app = new \Espo\Core\Application();

            //BEGIN
            $file 'data/logs/executions-' date('Y-m-d') . '.log';
            $data "[" date('H:i:s') . "] " . @$_SERVER['REQUEST_URI'] . "\n";
            file_put_contents($file$dataFILE_APPEND LOCK_EX);
            //END

            $app->run(); 
            The number of the last line will be the count of executions per day.
            Last edited by tarasm; 07-07-2015, 02:21 PM.
            Job Offers and Requests

            Comment


            • #7
              Hi,
              Thanks!
              you mean line 5-6 because that what i have:
              PHP Code:
              <?php

              require_once('../../bootstrap.php');

              $app = new \Espo\Core\Application();
              $app->run();

              Comment


              • #8
                by the way i see in the error log every day this error:
                PHP Code:
                PHP Fatal error:  Call to a member function getEntityName() on a non-object in /home/public_html/crm/application/Espo/Core/Acl.php on line 132 

                Comment


                • #9
                  Here is the log file. you can see here is some call:
                  PHP Code:
                  /api/v1/Notification/action/notReadCount 
                  runs evrey couple secends

                  also i see some error:

                  PHP Code:
                  [2015-07-07 06:19:57Espo.ERRORAPI [GET]:/:controllerParams:Array
                  (
                      [
                  controller] => Call
                  )
                  InputData:  -  [] []
                  [
                  2015-07-07 06:19:57Espo.ERRORDisplay Error: , Code403 URL: /api/v1/Call?maxSize=5&offset=0&sortBy=dateStart&asc=false&where%5B0%5D%5Btype%5D=boolFilters&where%5B0%5D%5Bvalue%5D%5B%5D=onlyMy&where%5B1%5D%5Btype%5D=notIn&where%5B1%5D%5Bfield%5D=status&where%5B1%5D%5Bvalue%5D%5B%5D=Held&where%5B1%5D%5Bvalue%5D%5B%5D=Not+Held [] []
                  [
                  2015-07-07 09:05:04Espo.ERRORAPI [GET]:/:controllerParams:Array
                  (
                      [
                  controller] => Call
                  )
                  InputData:  -  [] []
                  [
                  2015-07-07 09:05:04Espo.ERRORDisplay Error: , Code403 URL: /api/v1/Call?maxSize=5&offset=0&sortBy=dateStart&asc=false&where%5B0%5D%5Btype%5D=boolFilters&where%5B0%5D%5Bvalue%5D%5B%5D=onlyMy&where%5B1%5D%5Btype%5D=notIn&where%5B1%5D%5Bfield%5D=status&where%5B1%5D%5Bvalue%5D%5B%5D=Held&where%5B1%5D%5Bvalue%5D%5B%5D=Not+Held [] [] 
                  Attached Files

                  Comment


                  • #10
                    What EspoCRM version you have currently installed? The last version is 3.4.2.
                    Error 403, it's just Forbidden. It can occur when you restrict records by the Roles.
                    Job Offers and Requests

                    Comment


                    • #11
                      yes my version is not the last and i will update and let you know

                      Comment


                      • #12
                        How was this issue with too many Account Executions resolved?

                        I am getting over 100,000 executions in just 5 days of predeployment testing. The stats software is showing that 50% of hits are at this directory /api/v1/Notification/action/notReadCount and another 35% of hits are at this directory /api/v1/Activities/action/popupNotifications. I am using version 4.3.0.

                        Comment


                        • #13
                          In case anyone stumbles upon this as I did, you can adjust the frequency of notReadCount and popupNotifications as follows:

                          1) For popupNotifications, copy the popupNotifications.json file from Espo's application files to custom/Espo/Custom/Resources/metadata/app/popupNotifications.json and set "interval" as needed.

                          2) For notReadCount, add 'notificationsCheckInterval' => YOUR_INTERVAL_IN_SECONDS to config.php.

                          Comment

                          Working...
                          X