Announcement

Collapse
No announcement yet.

Timeout PHP when saving Account record

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

  • Timeout PHP when saving Account record

    Hi,

    I'm experiencing a timeout when saving one specific Account record. There is no entry in the espo logs, but in the apache logs it has:

    Code:
    [Tue Jul 18 14:23:33.743826 2023] [php:error] [pid 53796] [client 31.21.120.116:54060] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/html/application/Espo/Core/Utils/ClassFinder.php on line 57, referer:
    The record does save first. I don't have a pre or post save formula. I also disabled all workflows related to the record.

    I'm using:

    Espo 7.5.5
    Advanced Pack 3.0.3 Reports, Workflows, BPM.
    Export Import 1.0.8 Data export and import tool
    Ebla Multiple Link Pro 3.36.4 Let Link Multiple Field render as list with inline editing support.
    Dubas Custom Formulas 0.0.2 Extension let you use custom formulas. Support available through email contact@devcrm.it.
    Sales Pack 1.2.0

    Any idea what might be causing this?
    Last edited by Maarten; 07-18-2023, 02:44 PM.

  • #2


    there are some php.ini variable to ajust for espocrm then restart your webserver for update setting

    what is your hosting provider and ressources allowed ?

    Comment


    • #3
      Thanks, I know that I can always increase the timeout limit. But no process should run more than 30 seconds. It seems there is an issue with the record itself. I deleted the record and recreated it. Now it seems fine. But I think there is still an underlying issue. Maybe a data corruption that can happen in some situations.

      Comment


      • item
        item commented
        Editing a comment
        maybe a special char ?
        verify collation/charset of database.

    • #4
      To chase the error disable all extensions and start enabling one by one. Somtimes you get the culprit that way.

      Comment


      • #5
        I think I have figured it out. I have an accountParent relationship:
        Click image for larger version

Name:	image.png
Views:	229
Size:	5.9 KB
ID:	95686

        Through the UI i am unable to set the current account to itself as parent (makes sense)

        But through the API it is possible to set the accountParent1Id to the id of the current account. There is no error thrown by the API.
        And when this has happened by accident, it won't be possible to save the record anymore (neither UI or API) as it goes into some circular actions and times out.

        Yuri, is it possible to have the API throw an error when a record is setting itself as parent?

        Comment


        • #6
          I could not reproduce the error when saved an account record with a parent set to itself. Maybe your customization (formula or code) is a culprit of the loop. Anyway, you can handle this with API-Before-Save script formula, by throwing an error if accountParentId == id.

          Comment


          • #7
            Yes, I can do it before the API! Thanks.

            I inactivated all workflows and BPM scripts btw, so that shouldnt create the loop.

            Comment


            • yuri
              yuri commented
              Editing a comment
              It could be somewhere else. At least, I could not reproduce it.
          Working...
          X