Extremely low speed server response - 6 seconds!

I decided to start this journey :slight_smile:
So I used this post to setup a Debug environment.
Now I don’t know how to debug exactly. How should I open SuiteCRM as a project (!) and hit Debug so that it opens in a Browser and then with breakpoints (or other ways) I can debug the code.
Thanks in advance.

Hmm I couldn’t get it to work with Visual Studio Code, so I turned to the “big” Visual Studio. Maybe you can ask for help on StackOverflow, since it’s more of a generic problem (how to debug PHP in VS Code).

But just so I understand, is your debugger on one computer, and your SuiteCRM on another? Are they both Windows? Do you have the source code on both sides?

1 Like

We use a Ubuntu desk top (Linux) as our local development machines with a standard lamp stack installed. We have xdebug installed on every machine and use PHP Storm as our IDE.

https://devzone.zend.com/1120/introducing-xdebug/
https://xdebug.org/wizard.php

You need to install an extension into your browser. I use Xdebug helper 1.5 for chrome

Once its all installed and configured properly all you need to do is enable the debugging in the browser and in the IDE then set break points in the code your executing. It should stop at the break points and allow you to manually step through the code line by line and see exactly what is going on.

The trouble with doing this with SuiteCRM is its sheer size, if you dont know roughly where the problem lies in the code then it will be vary hard to step through the entire thing and keep track of whats happening. For example if you know the problem is in a logic hook you just need to step through that code the same if you know the problem is with a specific module.

1 Like

I would take a guess and say its your server configuration that’s the problem here! Are you sure that everything meets the requirements for SuiteCRM?
Are the permissions set correctly?

PHP setups on Windows usually have very restrictive settings by default. SuiteCRM needs quite liberal settings.

Edit your php.ini file and increase the memory_limit to at least 256MB and increase other values that you think might have an effect. Turn off php warnings, notices and errors. The only errors that are relevant are fatal errors.

TBH I personally wouldn’t use bitnami or Windows I would manually install SuiteCRM on a properly configured Linux sever and you shouldn’t have any speed problems at all.

1 Like

memory_limit is 256MB.

My OS is Windows 7 Ultimate 64bit. This the server and I am using SuiteCRM on this system as well. And of course there are 4-5 other PCs connected to my PC (the server) through WiFi.

Here is what I have done so far:

  1. Installed Bitnami WAMP Stack
  2. Installed Bitnami SuiteCRM WampStack module.
  3. Started using and response time was about 0.2 Seconds.
  4. After awhile response time got higher now is around 10 Seconds.
  5. Got a full backup of SuiteCRM
  6. Installed WampServer and restored the backup (All files and folders inside htdocs to www and imported db from phpMyAdmin.) response time went much higher around 20 seconds.
  7. Then I restored the backup to a Shared Linux server online. (crm.fasleaval.com) Still the response time 8-10 seconds. I could give you a test username and password (to somewhere private) to check the response time.

Would you still say that the problem is the Server Configuration?

This is a difficult one, since you started using it and it went from 0.2 to 10 seconds what has changed? Did you do any customisation or install third party modules? Have you imported a large amount of records etc…?

I have mentioned before:

These are some customization I have made:

  1. changed the history sub-panel to show “Description”.
  2. added a field to “Account”.
  3. changed the layout of some modules from studio.
  4. added account type to “Account”.
  5. made some changes to .css files for RTLing.

And Have entered (not imported) about 750 accounts, 750 contacts, 80 opportunity, 130 leads, 110 cases, 1750 calls, 230 tasks, 10 workflows and NO email SMTP is set,

So I have these FATAL ERRORs in log:

06/27/16 22:14:16 [3528][62314ec0-1868-1837-f16c-569de9876160][FATAL] SugarPHPMailer encountered an error: The outbound mail server selected for the mail account you are using is invalid.  Check the settings or select a different mail server for the mail account.
06/27/16 22:14:16 [3528][62314ec0-1868-1837-f16c-569de9876160][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
06/27/16 22:14:16 [3528][62314ec0-1868-1837-f16c-569de9876160][FATAL] Notifications: error sending e-mail (method: smtp), (error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting)

Hmm none of that should cause the problems you describe. I guess all you can do is try to undo some of the changes to see if it has an effect. You could also start with a fresh installation of the latest version of SuiteCRM and export your current records and import them into your fresh installation. You can also export and import studio changes. I assume after moving the crm to a new server you have caried out quick repair and rebuilds and rebuild relationships.

1 Like

That seems a fine idea. I would test and share the result.

I haven’t read all the other suggestions but I just wanted to share that I have experienced a drastic improvement after I upgrade the PHP version from 5 to 7.

Is it possible for Bitnami Wampstack php to upgrade?

The bright side of Bitnami installs is the initial installation, the deployment. The not-so-good side are the stack component upgrades, I’m afraid.

See my interchange with their (very helpful) personnel:

https://community.bitnami.com/t/suitecrm-upgrading-php-to-7-0/41857/8

When I do find the time to upgrade my PHP, I plan to start a new VM from scratch, probably plain Ubuntu Server with their LAMP stack like Andy suggested.

I’m going to keep my IDE in Windows, though, I’m happy with it. I would try PHP Storm but I don’t have free access to use it like SalesAgility staff have (for being core developers of an open source project).

You will see an improvement with php 7 because php 7 is much faster then previous versions of php but you wont have solved the root cause of your problem.

It is very easy to install SuiteCRM manually without using Bitnami. I personally wouldn’t bother with it.

sorry for (only slightly) hijacking the thread, but this might help the OP as well…

Andy, I’m looking at the plain Ubuntu install, do you have any advice on MySQL vs. MariaDB for SuiteCRM?

And do you install the LAMP stack by hand, Apache, then DB, then PHP, etc., or do you just tick the LAMP checkbox in the Ubuntu alternate installer to install everything at once?

Just check the LAMP checkbox unless you want to install specific versions of PHP etc…

MySQL vs. MariaDB really makes very little difference (to SuiteCRM)

Id just use MySQL unless you have reason to use another DB engine.

Thanks Andy. I installed Ubuntu 16.04 in a VM and it was, in fact, easy to get SuiteCRM up and running. I was itching to see the new Theme in the beta.

In case it’s useful for anybody, here are all the additional modules you’re going to need:

apt install php-mbstring php7.0-mbstring php-gettext php-xml-parser php7.0-zip php7.0-imap php7.0-gd php7.0-curl phpmyadmin

phpMyAdmin is not mandatory, but is very useful.

Now I’m off to try and migrate my data and customizations…

Hi
I’ve discovered something on this issue: This high response time only happens to system administrators.
We have 3 admins and 3 regular users.
Regular users have a response time around 0.9 seconds (which is high but acceptable at the moment).
Admins have a response time around 10 seconds! :woohoo:

I changed one of the admins’ user type to regular user (However the “Access” for everything was still set to all). I deleted the cache folder and the “Quick Repair and Rebuild”. I cleared browser cache and even changed the browser (Mozilla to Chrome). So I was hoping the response time for this use as high as 0.9 seconds but it was still 10 seconds.

Here I guess we have a problem with loading the access/role/security-group for admins every time we load a module/page. Which makes me wonder why after changing user type it was not affected.

What do you think?

Maybe your admins are simply getting a lot more records returned in the queries? This would not be enough to justify such a delay, bit it might help look for the problem.

Have you ever checked your database to see how many security records you have? Try this in phpMyAdmin:

SELECT securitygroups.name, securitygroup_id, count(securitygroup_id) FROM securitygroups_records,securitygroups
where securitygroups.id = securitygroup_id
group by securitygroup_id

Try to see if those numbers make sense to you: how many records are assigned to each security group. Then you could further explore how many of them are deleted (field deleted = 1).

Once I had to purge that table from lots of old records but it was my own fault, I had done some imports with PHP scripts, some database deletes… there were left-overs to clean up.

Anyway, I’m not sure any of this is going to help, if others have better suggestions, go ahead…

1 Like

THANKS! This was very useful!

@AmirhosseinRzd

could this be the cause of your problem?

https://github.com/salesagility/SuiteCRM/issues/1861

1 Like