Create Lead, Save once, Creates 658 Leads

Okay, so I’m running: Version 7.10.11, Sugar Version 6.5.25 (Build 344)

It’s a fairly new install, and I don’t think much has been customized on leads, certainly nothing that is required.

I’ve got complete Admin capabilities (SSH Terminal, FTP, etc), and I’ve been through all CHOWN and CHMOD instructions, as well as a Quick Repair and Rebuild.

Create other default objects, and they work just fine. When I create a Lead, it “hangs” and eventually times out. I am doing another recreation of this problem (ALWAYS reproducible!), and following all of the log files, and looking for ALL errors.

In Chrome, I am receiving a warning on initial page load of the Create Lead page:

  • [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help, check https://xhr.spec.whatwg.org/.

I simply enter “DELETEME” for the first name, and “BADLEAD” for the last name, and then scroll down to hit Save.

I get the “Loading page, please wait…” message on the screen, for about 30 seconds, then get an HTTP Error 500.

Other Errors:

Apache Error Log:

[Wed Dec 12 01:35:49.218686 2018] [php7:error] [pid 22723] [client ##.##.##.###:50752] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/crm.trusted.team/modules/AOD_Index/Lib/Zend/Search/Lucene/Index/SegmentInfo.php on line 319, referer: http://crm.trusted.team/index.php?action=ajaxui
Apache Access Log:

[12/Dec/2018:01:34:37 +0000] "GET /index.php?module=Alerts&action=get&to_pdf=1 HTTP/1.1" 200 749 "http://crm.trusted.team/index.php?action=ajaxui" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"
[12/Dec/2018:01:35:07 +0000] "POST /index.php HTTP/1.1" 500 704 "http://crm.trusted.team/index.php?action=ajaxui" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"
[12/Dec/2018:01:35:37 +0000] "GET /index.php?module=Alerts&action=get&to_pdf=1 HTTP/1.1" 200 749 "http://crm.trusted.team/index.php?action=ajaxui" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"

Nothing appears in the suitecrm.log file.

Ubuntu syslog Activity:

Dec 12 01:34:52 LAutore-####### [CCafException] AmqpCommon::[23742]: CommAmqpListener: [CCafException] AmqpCommon::validateStatus() amqp_socket_open_noblock: hostname lookup failed
Dec 12 01:35:29 LAutore-####### snapd[12049]: storehelpers.go:443: cannot refresh: snap has no updates available: "core", "gnome-3-26-1604", "gnome-calculator", "gnome-characters", "gnome-logs", "gnome-system-monitor", "gtk-common-themes"
Dec 12 01:35:29 LAutore-####### snapd[12049]: autorefresh.go:387: auto-refresh: all snaps are up-to-date

Really struggling here, and I’m willing to DIG DEEP to resolve it. I’m a “moderately skilled” PHP developer, and willing to try a lot of stuff to make things better. All suggestions are welcome!

Help! :slight_smile:

Hi, welcome! I’m sorry you’re running into problems.

  1. The deprecation error in Chrome - you can ignore this, everybody has it

  2. Please explain the “creates 658 leads” in your title - you don’t even mention this in the post. Are you serious? :slight_smile: does it create the same lead 658 times, or what?

  3. If you increase (in your php.ini) the max_execution_time, the system won’t interrupt the operation as quickly. But I don’t think this will solve your problem, maybe it will just wait longer and let the system create 1264 leads, or something.

  4. You mention customizations in Leads. I would focus on this, no matter how small the customizations are. Your behaviour is consistent with a logic hook that is recursive, like giving a “save” command inside a “after_save” logic hook.

  5. It’s impossible not to have any clues in suitecrm.log. You can increase your log level in Admin / System settings, maybe that way you will see which queries it’s making, and other details.

Good luck, and tell us what you find.

THANK YOU!

(1) Thanks.
(2) Yes, serious. And, “sort of”… it created the lead with just the first name, and an address of “test”, and created 658 of those records.
(3) Agreed… increasing max execution time would only make this worse.
(4) Yeah… more below about this.
(5) HURRAY! I didn’t know that I could increase the log level.

So, I increased the log level, and got a LOT more information. Mostly Workflow stuff. That got me to the right place, where one of our users had created a Workflow:

  • Name: Test workflow
  • Assigned to: (someone who shouldn’t be creating workflows, apparently)
  • WorkFlow Module: Leads
  • Run: Always
  • Run On: All Records
  • Condition: “Leads Status Equal To Value New”
  • Actions: "Create Record, Leads, Field: FirstName, Field, FirstName
  • (and more)…

So, this has been disabled, and of the logic has been removed.

Thank you for the tools by which I can solve my problems!

Cool, I am glad you solved the mystery.