Bug 1002894 - Drupal website gets HAproxy error after update.
Summary: Drupal website gets HAproxy error after update.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Dan McPherson
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-30 07:42 UTC by aboutpune
Modified: 2015-05-14 23:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-19 16:48:40 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description aboutpune 2013-08-30 07:42:11 UTC
Description of problem:
After some upgrades my website stops working.
I'm using a scalable PHP app, with a MySql cartridge. 
I've installed Drupal on it.
I think Drupal can no longer connect to the database, as when I use an alternate index.php file, it can be accessed. If I use Drupal's index.php file, I see the HAproxy page that shows an L7STS/500 error.

I think it can no longer access the MySql cartridge, even though it's using openshift variables.


http://ab-outpune.rhcloud.com/


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 aboutpune 2013-08-30 10:33:02 UTC
Figured out the problem.

All my MySql settings got reset. 
I'd changed the log file sizes for INNODB in my.cnf, and MySql wouldn't start.

Deleted the log files, and everythings working now.


But, I can no longer edit my.cnf.

Comment 2 Dan McPherson 2013-09-09 20:16:04 UTC
@aboutpune Can you let me know what settings you set and what you set them to?  We can either make the values configurable or adjust them for everyone depending on the request.

Comment 3 aboutpune 2013-09-10 03:41:54 UTC
I wanted tables to be created in INNODB by default, and I wanted to play around with the memory settings to get better performance. Since I was using a separate gear for the database, I wanted to allocate a sizable chuck of RAM to it.

default-storage-engine = INNODB
#INNODB
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 96M
innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 24M
innodb_log_buffer_size = 24M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

Comment 4 Dan McPherson 2013-09-10 15:41:11 UTC
Fixed with:

https://github.com/openshift/origin-server/pull/3599


You'll need to run:

rhc env set OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE=INNODB -a <myapp> && rhc cartridge restart -c mysql-5.1 -a <myapp>


and all the other config is done by default for a mysql of a scaled app.

Comment 6 Qiushui Zhang 2013-09-11 11:31:16 UTC
Checked on devenv_3773.

Database engine variable OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE works. Default database engine is set according to this variable now. "MyISAM" if the var is not set.

Other variables in my.cnf is set according to the app ( scaling/non-scaling). And for scaling app, the settings are the same as comment 3.

Mark it as verified.

Comment 9 Chris Ryan 2013-10-04 11:59:48 UTC
When testing against hotfix 2.0.33, I am unable to see the mysql folder in the app, that is, the ~/mysql folder. I am able to use mysql (adding tables and data) but the folder is gone. 

rhc app create php1s php-5.3 mysql-5.1 -s
rhc env set OPENSHIFT_MYSQL_DEFAULT_STORAGE_ENGINE=INNODB -a php1s
rhc cartridge restart -c mysql-5.1 -a php1s
SSH to the app.
No mysql folder: cat ~/mysql/conf/my.cnf
mysql/conf/my.cnf: No such file or directory

Comment 10 Dan McPherson 2013-10-04 14:35:24 UTC
@Chris Ryan  With a scaled app, mysql is on a separate gear from php.  I assume you are sshing to the HEAD gear with just php above.

Comment 11 Chris Ryan 2013-10-07 08:32:21 UTC
Sorry, false alarm. You are correct, it was the HEAD gear.


Note You need to log in before you can comment on or make changes to this bug.