CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Server crash when SSL enabled
Pages: [1]

Author Topic: Server crash when SSL enabled  (Read 2557 times)

cjaime6

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.1.0
  • CMS version: Wordpress 3.3.1
  • MySQL version: 5.5.23
  • PHP version: 5.2.17
Server crash when SSL enabled
June 12, 2012, 02:43:36 pm
Hello, I really need help with this issue as I have been trying to figure out for a week now. I am trying to setup SSL to be used for Civi but when I go to System Settings > Resource Urls  and try to enable "Force URLS (SSL) as soon as I click on YES then hit SAVE, the entire site freezes then crashes. It takes a few minutes for the server to restart mysql then the site comes back up but Civi never saves the YES for the SSL. It is still at NO and of course no SSL redirection when I go to a contribution page.

Any help would be greatly appreciated.

MySql: 5.5.23
PHP: 5.2.17
Wordpress: 3.3.1
CiviCrm: 4.1.0

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Server crash when SSL enabled
June 12, 2012, 04:39:37 pm
Have you tested that the SSL works per the documentation?

"Once the certificate is installed and you have tested its functionality by browsing to a page on your site using https (rather than http), you should enable SSL redirection in CiviCRM....After you enable the Force Secure URLs setting and save the page, CiviCRM will automatically check to ensure the SSL certificate is activated and working properly."


cjaime6

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.1.0
  • CMS version: Wordpress 3.3.1
  • MySQL version: 5.5.23
  • PHP version: 5.2.17
Re: Server crash when SSL enabled
June 12, 2012, 04:47:55 pm
Hi emilyf,

Yes I did do that. The https does work, not sure why selecting force ssl is causing Mysql server to crash then still not redirect like its supposed to.

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Server crash when SSL enabled
June 12, 2012, 05:16:34 pm
I would turn on all the debugging options to see where the query is failing. See this page: http://wiki.civicrm.org/confluence/display/CRMDOC41/Debugging

turn on debugging and backtrace in global settings > debugging. then follow the above page under the section of "Output all sql queries run by CiviCRM to a CiviCRM.*.log file" so you can see the query.

you can also turn on define('CIVICRM_DAO_DEBUG', 1); if you can't get the log file to output -- this one will output to the screen and the last query is the one it's freezing on.

post that error back here.

cjaime6

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.1.0
  • CMS version: Wordpress 3.3.1
  • MySQL version: 5.5.23
  • PHP version: 5.2.17
Re: Server crash when SSL enabled
June 13, 2012, 10:20:08 am
Ok, well I have enabled all debugging and got the file but its too large to post and to attach. Would it be possible to send to you directly? Thanks for all your help!

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Server crash when SSL enabled
June 13, 2012, 12:20:03 pm
just isolate and post the final query immediately after you submit that page, that is the query that it is failing on.

cjaime6

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.1.0
  • CMS version: Wordpress 3.3.1
  • MySQL version: 5.5.23
  • PHP version: 5.2.17
Re: Server crash when SSL enabled
June 13, 2012, 01:22:36 pm
ok I cleared log and was now able to attach. Please see attached file.

emilyf

  • Ask me questions
  • ****
  • Posts: 696
  • Karma: 54
  • CiviCRM version: 2.x - 4.x
  • CMS version: Drupal 5, 6, 7
Re: Server crash when SSL enabled
June 13, 2012, 04:53:30 pm
also you should check your apache error logs when the crash happens to see if it's generating a PHP error. post that if you get one.
also try emptying your civicrm_cache table.

from your log file the final query looks to be
Code: [Select]
SELECT  v.name as name ,v.value as value, v.grouping as grouping
FROM   civicrm_option_value v,
       civicrm_option_group g
WHERE  v.option_group_id = g.id
  AND  g.name            = 'contact_reference_options'
  AND  g.is_active       = 1  AND  v.is_active = 1   ORDER BY v.weight

is your site live or offline? make sure site is offline and that no one else is logged on as if multiple pages are loading then this isn't going to be right query. if you want to make sure then use the define('CIVICRM_DAO_DEBUG', 1); and it will write the queries to your screen -- post the last one from that.

cjaime6

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.1.0
  • CMS version: Wordpress 3.3.1
  • MySQL version: 5.5.23
  • PHP version: 5.2.17
Re: Server crash when SSL enabled
June 21, 2012, 09:13:02 am
ok Im back. Sorry out of town for a few days.

So I created a test site on the same host under a test folder. New Wordpress and Civicrm installations all plain. no other plugins etc. I still get the same issue. Starting to think its a host issue. I am using Gatorhost BTW.

Anyway, here is the last query of the log file for this test site:
Jun 21 16:07:35  [info]
$Query = string(26) "SET @civicrm_user_id = 102"


Jun 21 16:07:35  [info]
$Query = string(143) "
SELECT name, group_name, value
FROM   civicrm_setting
WHERE  ( group_name = 'Directory Preferences'
OR       group_name = 'URL Preferences' )
"

This is the error I am getting from the host error log:


[21-Jun-2012 18:09:43] WordPress database error MySQL server has gone away for query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_name IN ('test','wp-admin','admin-php') AND (post_type = 'page' OR post_type = 'attachment') made by require, wp, WP->main, WP->parse_request, get_page_by_path
[21-Jun-2012 18:09:43] WordPress database error MySQL server has gone away for query  SELECT SQL_CALC_FOUND_ROWS  wp_posts.* FROM wp_posts  WHERE 1=1  AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish')  ORDER BY wp_posts.menu_order, wp_posts.post_date DESC LIMIT 0, 10 made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts
[21-Jun-2012 18:09:43] WordPress database error MySQL server has gone away for query SELECT FOUND_ROWS() made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts
[21-Jun-2012 18:09:43] WordPress database error MySQL server has gone away for query SELECT ID, post_name, post_parent FROM wp_posts WHERE post_name IN ('test','wp-admin','admin-php') AND (post_type = 'page' OR post_type = 'attachment') made by require, wp, WP->main, WP->parse_request, get_page_by_path
[21-Jun-2012 18:09:43] WordPress database error MySQL server has gone away for query  SELECT SQL_CALC_FOUND_ROWS  wp_posts.* FROM wp_posts  WHERE 1=1  AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish')  ORDER BY wp_posts.menu_order, wp_posts.post_date DESC LIMIT 0, 10 made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts
[21-Jun-2012 18:09:43] WordPress database error MySQL server has gone away for query SELECT FOUND_ROWS() made by require, wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts


Any help would be greatly appreciated.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Server crash when SSL enabled
June 21, 2012, 10:37:43 am

for now, you might just want to put your entire site under ssl. Will get around this issue

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

cjaime6

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.1.0
  • CMS version: Wordpress 3.3.1
  • MySQL version: 5.5.23
  • PHP version: 5.2.17
Re: Server crash when SSL enabled
June 21, 2012, 11:26:21 am
Thanks Donald but that will eat up bandwidth and could really slow down the site. Any other options? I really need to get this fixed.

thanks for any help.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Server crash when SSL enabled
June 21, 2012, 11:42:02 am

Your other option would be to debug the code and figure out what is happening and why? That would help the project a lot if you can come up with a patch. A few other folks have also reported this issue

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

cjaime6

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.1.0
  • CMS version: Wordpress 3.3.1
  • MySQL version: 5.5.23
  • PHP version: 5.2.17
Re: Server crash when SSL enabled
June 21, 2012, 01:19:51 pm
Just one more thing to add. I contacted Hostgator to see if they could help. This is what they posted.

If you review section 7A of our TOS, you will see that queries cannot run for more than 15 seconds, which is what appears to be happening:
http://www.hostgator.com/tos/tos.php

I am not a programmer but no means. I only have enough experience with php/mysql to be dangerous so I wish I could help create a patch but unable at this time. If there is anyone who can help fix this issue or has already fixed this issue of timing out sql queries, Im sure others could benefit.

thanks.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Server crash when SSL enabled

This forum was archived on 2017-11-26.