Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leaks #9273

Closed
raciasolvo opened this issue Sep 2, 2021 · 6 comments
Closed

Memory leaks #9273

raciasolvo opened this issue Sep 2, 2021 · 6 comments
Labels
Area: Clean Up: Performance Issues & PRs related to all things regarding to performance Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds Type:Bug Bugs within the core SuiteCRM codebase

Comments

@raciasolvo
Copy link

raciasolvo commented Sep 2, 2021

Issue

We have issue with memory:

Fatal error: Allowed memory size of 4294967296 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/data/BeanFactory.php on line 118

Expected Behavior

Actual Behavior

Fatal error: Uncaught Error: Maximum function nesting level of '256' reached, aborting! in /var/www/html/data/BeanFactory.php on line 249

Error: Maximum function nesting level of '256' reached, aborting! in /var/www/html/data/BeanFactory.php on line 249

Possible Fix

Issue is here (SugarBean.php):

        if ((!$this->disable_vardefs && empty($loaded_definitions[$this->object_name]))
            || !empty($GLOBALS['reload_vardefs'])) {
            VardefManager::loadVardef($this->module_dir, $this->object_name);

Steps to Reproduce

Context

High priority

Your Environment

  • SuiteCRM Version used: 7.10.27
  • Operating System and version Debian 9
@tsmgeek tsmgeek added Type:Bug Bugs within the core SuiteCRM codebase Area: Clean Up: Performance Issues & PRs related to all things regarding to performance Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds labels Sep 2, 2021
@tsmgeek
Copy link
Contributor

tsmgeek commented Sep 2, 2021

Can you please indicate the exact CRM version you are using as /var/www/html/data/BeanFactory.php on line 249 does not point correctly to a function in latest that I can see.

@raciasolvo
Copy link
Author

raciasolvo commented Sep 2, 2021

@tsmgeek It was about 9 months ago. It was 7.10.27 version. I saw this old fix when I updated to a new version yesterday.

/data/BeanFactory.php:
image
image

@pgorod
Copy link
Contributor

pgorod commented Sep 2, 2021

Does this happen on a freshly installed system, or on the live demo?

Normally when I've seen this happening, it was caused by infinite loops in custom code. Typically, on-save logic hooks that call Save method, or something similar with workflows (or both).

@raciasolvo
Copy link
Author

raciasolvo commented Sep 3, 2021

@pgorod We have been using the application about three years in the production. We use a custom code. Once we saw those errors. We applied this fix and there were no those errors.
Ok, I'll try to find the old application container with those errors in the registry and check it. Thanks for the information about infinite loops in custom code. I'll try to check it again.

@raciasolvo
Copy link
Author

@pgorod You were right, the issue was in custom code. We added empty vardefs.php files for custom modules which don't use DB. It's ok now. I'll close PR. I think the issue can be closed. Thanks!

@SuiteBot
Copy link

This issue has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/admin-page-blank-and-fatal-error-messages/36047/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Clean Up: Performance Issues & PRs related to all things regarding to performance Priority:Moderate Issues & PRs that are minor; broken styling, cosmetic, warnings - there are practical workarounds Type:Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

4 participants