2
  • CentOS release 6.8
  • cPanel 56.0 (build 25)
  • Apache (v. 2.4.18)
  • PHP (v. 5.6.22)
  • MySQL (v. 5.6.30)
  • WordPress (v. 4.5.3)
  • CiviCRM (v. 4.6.19)

Previously posted here but wouldn't allow me to edit: CiviCRM Dashboard Hangs for 5+ minutes


Aug 11 15:27:22  [info] $backTrace = #0 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(235): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(PEAR_Error))
#2 /home/user/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(PEAR_Error))
#3 /home/user/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(566): PEAR_Error->PEAR_Error("Connection timed out", 110, 16, (Array:2), NULL)
#4 /home/user/public_html/wp-content/plugins/civicrm/civicrm/packages/Net/Socket.php(156): PEAR->raiseError("Connection timed out", 110)
#5 /home/user/public_html/wp-content/plugins/civicrm/civicrm/packages/HTTP/Request.php(737): Net_Socket->connect("###.###.###.###", 80, NULL, NULL, NULL)
#6 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(1393): HTTP_Request->sendRequest()
#7 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Dashboard.php(329): CRM_Utils_System::getServerResponse("http://###.###.###.###/~user/wp-admin/admin.php?page=CiviCRM&q=civicrm/das...")
#8 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/Page/AJAX.php(606): CRM_Core_BAO_Dashboard::getDashletInfo(12)
#9 [internal function](): CRM_Contact_Page_AJAX::dashboard()
#10 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(278): call_user_func((Array:2))
#11 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:12))
#12 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#13 /home/user/public_html/wp-content/plugins/civicrm/civicrm.php(1196): CRM_Core_Invoke::invoke((Array:3))
#14 [internal function](): CiviCRM_For_WordPress->invoke("")
#15 /home/user/public_html/wp-includes/plugin.php(525): call_user_func_array((Array:2), (Array:1))
#16 /home/user/public_html/wp-admin/admin.php(236): do_action("toplevel_page_CiviCRM")
#17 {main}


Aug 11 15:27:22  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => 110
    [message] => Connection timed out
    [mode] => 16
    [debug_info] => 
    [type] => PEAR_Error
    [user_info] => 
    [to_string] => [pear_error: message="Connection timed out" code=110 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
)


Aug 11 15:27:22  [info] $backTrace = #0 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(235): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(PEAR_Error))
#2 /home/user/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(PEAR_Error))
#3 /home/user/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(566): PEAR_Error->PEAR_Error("Connection timed out", 110, 16, (Array:2), NULL)
#4 /home/user/public_html/wp-content/plugins/civicrm/civicrm/packages/Net/Socket.php(156): PEAR->raiseError("Connection timed out", 110)
#5 /home/user/public_html/wp-content/plugins/civicrm/civicrm/packages/HTTP/Request.php(737): Net_Socket->connect("###.###.###.###", 80, NULL, NULL, NULL)
#6 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(1393): HTTP_Request->sendRequest()
#7 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Dashboard.php(329): CRM_Utils_System::getServerResponse("http://###.###.###.###/~user/wp-admin/admin.php?page=CiviCRM&q=civicrm/das...")
#8 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Contact/Page/AJAX.php(606): CRM_Core_BAO_Dashboard::getDashletInfo(1)
#9 [internal function](): CRM_Contact_Page_AJAX::dashboard()
#10 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(278): call_user_func((Array:2))
#11 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:12))
#12 /home/user/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
#13 /home/user/public_html/wp-content/plugins/civicrm/civicrm.php(1196): CRM_Core_Invoke::invoke((Array:3))
#14 [internal function](): CiviCRM_For_WordPress->invoke("")
#15 /home/user/public_html/wp-includes/plugin.php(525): call_user_func_array((Array:2), (Array:1))
#16 /home/user/public_html/wp-admin/admin.php(236): do_action("toplevel_page_CiviCRM")
#17 {main}

I have noticed others having very similar issues but none of their solutions worked for me. The dashboard will not load for a long time and then once it does the dashlets are not loaded and infinitely spin.

I have found this log output in /home/user/public_html/wp-content/plugins/files/civicrm/ConfigAndLog/CiviCRM.3f6fec17262bb84dcce5a4b3bb6fffe7.log and cannot figure out to fix it as I do not understand the error. Please help :-)

4

I think the best solution would be to upgrade to CiviCRM 4.7.11 which will include an improved dashboard that no longer depends on server-to-self http requests.

This upgrade will be released in about 2 weeks. The new dashboard features are sponsored by WMF.

Read more about the issue at https://issues.civicrm.org/jira/browse/CRM-17663

  • Hi @Coleman, thanks for the response. This seems promising! Thanks for the heads up! :-) – LJB Aug 12 '16 at 15:22
  • Hello Coleman! I was able to finally resolve this issue. I found this small portion at the very bottom of wiki.civicrm.org/confluence/display/CRMDOC/… labelled Fire with NAT. Followed the instructions to edit the hosts file to point internal traffic going out to it's own domain to be redirected back to the internal IP and everything was automagically fixed! Thank you for all of your help, I appreciate it! :-) – LJB Aug 26 '16 at 19:56
2

Your debug output indicates that your site is hosted at (obfuscated) http://example.org/~user/. To load the dashboard, your webserver has to be able to "talk to itself" via this URL. This is not always the case!

Based on your description, here's what I think is happening:

  • Your browser requests http://example.org/~user/wp-admin/admin.php?page=CiviCRM&q=civicrm/dashboard
  • CiviCRM receives this request and starts composing dashboard output
  • CiviCRM tries to retrieve http://example.org/~user/wp-admin/admin.php?page=CiviCRM&q=civicrm/dashlet/getting-started&reset=1&snippet=5 (and other dashboard elements) using PEAR's HTTP_Request
  • This connection fails, leaving the HTTP_Request hanging ...
  • After a while, CiviCRM gives up
  • You see an error of some kind.

If that's the case, then the fix is to make sure that your webserver can make requests to your webserver. This sounds weird, but it's what CiviCRM is trying to do. Often this is because the webserver doesn't get working DNS result when looking itself up (servers behind proxies or without DNS), but you seem to be using an IP address.

You also need your webserver to be able to handle sufficient concurrent requests. It's possible a development webserver config might lack this. (This is the nginx pm.max_children setting mentioned here and in CRM-16035, in your Apache this is MaxClients).

Take a look at The dashboard does not render also - it covers some other possibilities.

Quick test to see if this is dashboard specific: use almost any other page in CiviCRM. AFAIK only the dashboard only makes requests to CiviCRM itself (there are a couple of other spots, eg some security checks, but mostly just the dashboard).

  • Hi @Chris Burgess, thanks for the response. I doubled the maxClients for Apache and there's no difference. I have also tried wget to check if the server is able to send http request to itself and it seems as if this may be the issue since it failed to connect in several different attempts. Although I should mention that this server is WHM/cPanel and runs it's own local DNS. So what exactly do I do now in order for it to start accepting HTTP requests to itself? – LJB Aug 12 '16 at 15:21
  • Until you get to 4.7.11, configuring your server so that it can communicate locally with itself is the next step for you. Maybe update your question with the output of the failed wget command? (Does your server URL really use an IP address, or was that just your obfuscation?) – Chris Burgess Aug 12 '16 at 19:53
  • Hi @Chris Burgess, the wget times out and doesn't give a specific error other than it just keeps retrying. That particular website I created as a mockup to solve the issue as this is affecting 2 production sites, so this one is an IP as the other two are http://{domain}.{tld} – LJB Aug 12 '16 at 20:04
  • You need to understand your hosting environment to determine why wget is unable to connect to the IP and port your webserver runs on. Could be firewall, filtering, proxying, internal vs external IP address ... I'd first check ifconfig on your server reports the same IP you're using externally. – Chris Burgess Aug 12 '16 at 21:44
  • Hello Chris Burgess! I was able to finally resolve this issue. I found this small portion at the very bottom of wiki.civicrm.org/confluence/display/CRMDOC/… labelled Fire with NAT. Followed the instructions to edit the hosts file to point internal traffic going out to it's own domain to be redirected back to the internal IP and everything was automagically fixed! Thank you for all of your help, I appreciate it! :-) – LJB Aug 26 '16 at 19:56
1

Probably not the solution you are looking for but it's worked for me in the past. -Configure your Dashboard and remove all the dashlets so your dashboard is blank. -Save -Clear Caches. -Re-enable the dashlets

  • Hi @YossiCrm, I just tried your solution and it did not work for me. But thank you very much for trying to help! :-) – LJB Aug 12 '16 at 14:43
  • Hello YossiCrm! I was able to finally resolve this issue. I found this small portion at the very bottom of wiki.civicrm.org/confluence/display/CRMDOC/… labelled Fire with NAT. Followed the instructions to edit the hosts file to point internal traffic going out to it's own domain to be redirected back to the internal IP and everything was automagically fixed! Thank you for all of your help, I appreciate it! :-) – LJB Aug 26 '16 at 19:55
0

I was able to finally resolve this issue.

I found this small portion at the very bottom of https://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Configuration+Troubleshooting labelled Fire with NAT. Followed the instructions to edit the hosts file to point internal traffic going out to it's own domain to be redirected back to the internal IP and everything was automagically fixed! Thank you everyone for all your help, I appreciate it! :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.