Results 1 to 10 of 10
Thread: my.cnf help
-
04-15-2014, 06:45 AM #1Junior Guru
- Join Date
- Oct 2006
- Posts
- 210
my.cnf help
Hello,
We have a server having 8GB of Ram, website is based on wordpress having database around 700MB.
Server is running on Apache latest version & Nginxcp having latest version of PHP and MariaDB (10).
We are using cache plugin and we have the following cache enabled
- memcache
- OPcache
PHP memory limit is set to 512 MB and yet we receive Internal server error while adding new post (we do have large number of tags applied to the post).
our server my.cnf has the following:
GNU nano 2.0.9 File: /etc/my.cnf
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[mysqld]
innodb_file_per_table=1
local-infile=0
datadir=/var/lib/mysql
long_query_time=2
;log_output=file
slow_query_log
;slow_query_log_file=/var/log/mysql-slow-queries.log
;log_queries_not_using_indexes
join_buffer_size=3M
query_cache_limit=10M
query_cache_size=600M
query_cache_type=1
max_user_connections=200
max_connections=200
thread_cache_size=128
table_cache=1228
key_buffer_size=1024M
#max_connect_errors=20
max_allowed_packet=8M
sort_buffer_size=1M
read_buffer_size=1M
read_rnd_buffer_size=1M
thread_concurrency=4
myisam_sort_buffer_size=8M
concurrent_insert=2
local-infile=0
table_definition_cache=2500
max_heap_table_size=1024M
tmp_table_size=1024M
open_files_limit=10632
#####fixed innodb options
innodb_buffer_pool_size = 1024M
innodb_write_io_threads = 8
innodb_read_io_threads = 8
innodb_thread_concurrency = 16
innodb_log_buffer_size = 8M
innodb_max_dirty_pages_pct = 90
innodb_file_per_table
#####for 5.5 trees ## Uncomment for 5.5
innodb_buffer_pool_instances=16
#tmpdir=/var/tmp
-------- Performance Metrics -------------------------------------------------
[--] Up for: 17h 26m 30s (2M q [40.982 qps], 48K conn, TX: 4B, RX: 403M)
[--] Reads / Writes: 99% / 1%
[--] Total buffers: 3.6G global + 3.3M per thread (200 max threads)
[OK] Maximum possible memory usage: 4.2G (55% of installed RAM)
[OK] Slow queries: 0% (107/2M)
[OK] Highest usage of available connections: 9% (19/200)
[OK] Key buffer size / total MyISAM indexes: 1.0G/397.0M
[OK] Key buffer hit rate: 100.0% (415M cached / 187K reads)
[OK] Sorts requiring temporary tables: 0% (157 temp sorts / 102K sorts)
[!!] Joins performed without indexes: 15402
[!!] Temporary tables created on disk: 41% (54K on disk / 133K total)
[OK] Thread cache hit rate: 99% (19 created / 48K connections)
[OK] Table cache hit rate: 112% (595 open / 531 opened)
[OK] Open file limit used: 7% (800/10K)
[OK] Table locks acquired immediately: 99% (479K immediate / 479K locks)
[OK] InnoDB data size / buffer pool: 496.9K/1.0G
-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Upgrade MySQL to version 4+ to utilize query caching
Adjust your join queries to always utilize indexes
Temporary table size is already large - reduce result set size
Reduce your SELECT DISTINCT queries without LIMIT clauses
Upgrade to MySQL 4.1+ to use concurrent MyISAM inserts
Variables to adjust:
join_buffer_size (> 3.0M, or always use indexes with joins)
root@dedi [~]#
Also what other tweaks I should apply to overcome the 500 internal server error while adding new post, and also I have noticed that page load extremely slow when I want to list all posts in wp-admin.
-Thanks.
-
04-15-2014, 07:45 AM #2WHT Addict
- Join Date
- Nov 2010
- Posts
- 109
This seems to be more of a web server issue and not SQL issue. Try checking Apache logs.
Brijesh Kothari - President Softaculous | AMPPS | Loginizer
Softaculous - Best and Fastest Auto Installer and WordPress Manager
Webuzo - Multi User Control Panel
AMPPS - Local development stack for Windows and Mac
-
04-15-2014, 08:13 AM #3Web Hosting Master
- Join Date
- Aug 2001
- Posts
- 5,597
Like Brijesh already mentioned, you need to check what the log files say for the error.
-
04-15-2014, 01:42 PM #4Web Hosting Guru
- Join Date
- Nov 2013
- Posts
- 263
Is the internal server error still happening? Tail the access-log same time you access the page to see the exact cause of internal server error.
-
04-15-2014, 03:04 PM #5Disabled
- Join Date
- Oct 2013
- Posts
- 253
Check apache logs in server for 500 error
The error is due to apache and also most of the time it could be due to some plugin looping and using more resources
-
04-16-2014, 03:09 AM #6Web Hosting Master
- Join Date
- Jan 2008
- Posts
- 1,204
To troubleshoot 500 internal error, you will have to check your Apache error logs. If you have cPanel, the logs should be in /usr/local/apache/logs/error_log
Run tail command in SSH console and try to add post. If you receive any error, it should be logged.|| Web Hosting Blog - Web Hosting security & latest web hosting industry Announcements
|| Web Hosting Discussion - A Web Hosting community
-
04-18-2014, 10:50 AM #7Junior Guru
- Join Date
- Oct 2006
- Posts
- 210
-
04-18-2014, 11:09 AM #8Junior Guru
- Join Date
- Oct 2006
- Posts
- 210
Ok got it, here is the output:
root@dedi [~]# tail -f /usr/local/apache/logs/error_log
[Fri Apr 18 19:59:49.553281 2014] [fcgid:warn] [pid 7871] (32)Broken pipe: [client 82.145.220.168:58034] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
[Fri Apr 18 20:01:14.693955 2014] [fcgid:warn] [pid 7877] (70007)The timeout specified has expired: [client 42.83.86.59:58064] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: http://www.mysite.com/mobile-apps/go...ranslate-2-4-2
[Fri Apr 18 20:01:47.253606 2014] [fcgid:warn] [pid 12585] (104)Connection reset by peer: [client 82.145.220.168:58137] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
[Fri Apr 18 20:03:49.209734 2014] [fcgid:warn] [pid 7869] [client 39.56.236.234:58406] mod_fcgid: read data timeout in 40 seconds, referer: http://www.mysite.com/wp-admin/post....53&action=edit
[Fri Apr 18 20:03:49.209882 2014] [core:error] [pid 7869] [client 39.56.236.234:58406] End of script output before headers: post.php, referer: http://www.mysite.com/wp-admin/post....53&action=edit
[Fri Apr 18 20:04:00.032707 2014] [fcgid:warn] [pid 7864] mod_fcgid: process 13384 graceful kill fail, sending SIGKILL
[Fri Apr 18 20:04:01.888920 2014] [fcgid:warn] [pid 8747] (70007)The timeout specified has expired: [client 42.83.86.59:58385] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: http://www.mysite.com/mobile-apps/go...ranslate-2-4-2
[Fri Apr 18 20:04:05.651580 2014] [fcgid:warn] [pid 9921] (70007)The timeout specified has expired: [client 141.0.11.112:58397] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
[Fri Apr 18 20:04:29.255119 2014] [fcgid:warn] [pid 7869] [client 39.56.236.234:58406] mod_fcgid: read data timeout in 40 seconds, referer: http://www.mysite.com/wp-admin/post....53&action=edit
[Fri Apr 18 20:04:29.255236 2014] [core:error] [pid 7869] [client 39.56.236.234:58406] End of script output before headers: index.php, referer: http://www.mysite.com/wp-admin/post....53&action=edit
-
04-19-2014, 12:27 PM #9Problem Solver
- Join Date
- Mar 2003
- Location
- California USA
- Posts
- 13,681
Are you using the default settings provided by cPanel for your fastcgi implementation or are you using custom settings? If you are using custom settings can you please provide them for us to view?
Steven Ciaburri | Industry's Best Server Management - Rack911.com
Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance
-
04-19-2014, 02:30 PM #10Junior Guru
- Join Date
- Oct 2006
- Posts
- 210
Hi,
We were using the default, but today I added the following:
to httpd.conf
<IfModule fcgid_module>
IdleTimeout 3600
ProcessLifeTime 7200
MaxProcessCount 64
DefaultMaxClassProcessCount 8
IPCConnectTimeout 300
IPCCommTimeout 7200
BusyTimeout 300
FcgidMaxRequestLen 52428800
</IfModule>
and created the file /etc/httpd/conf/fcgid.conf
and added the following:-
AddHandler fcgid-script .fcgi .php
# Where to look for the php.ini file?
DefaultInitEnv PHPRC "/etc/php5/cgi"
# Where is the PHP executable
FCGIWrapper /usr/bin/php-cgi .php
# Maximum requests a process handles before it is terminated
MaxRequestsPerProcess 1500
# Maximum number of PHP processes.
MaxProcessCount 45
# Number of seconds of idle time before a process is terminated
IPCCommTimeout 240
IdleTimeout 240
# Large site
ServerLimit 2048
ThreadLimit 100
StartServers 10
MinSpareThreads 30
MaxSpareThreads 100
ThreadsPerChild 64
MaxClients 2048
MaxRequestsPerChild 5000
Similar Threads
-
my.cnf help
By khanbaba in forum VPS HostingReplies: 6Last Post: 01-04-2014, 01:45 PM -
Is /etc/my.cnf is OK?
By bdwebservices in forum Hosting Security and TechnologyReplies: 1Last Post: 10-16-2011, 05:47 AM -
what is the best my.cnf will be?
By threemints in forum Hosting Security and TechnologyReplies: 9Last Post: 04-30-2010, 12:49 AM -
my.cnf ignored?
By zoli in forum Hosting Security and TechnologyReplies: 10Last Post: 01-25-2010, 07:56 AM -
What do you think about this my.cnf?
By hostyourdream in forum Hosting Software and Control PanelsReplies: 10Last Post: 12-05-2009, 06:08 AM