Bastille Firewall Causing Mysql Connection Errors

Jan 27, 2008

The main function of my dedicated server is the vBulletin forum that we run.

Ever since I had bastille firewall installed and configured on my server we have been getting regular vBulletin errors.

Everything runs pretty smoothly most of the time, we can carry lots of connections without any issues, server has plenty of free RAM and CPU is never overloaded even during peak hours. I have been told bastille firewall (iptables) is configured correctly, all ports that need to be open are open.

But about twice per day we have a MySQL "disconnect" that lasts about 30-60 seconds per incident. For example we will start getting the following message via e-mail, and it will amount to 20-30 e-mails like this during the 30-60 second incident. After that, the e-mails and problems will go away, until next time.

vBulletin Database Error!
mysql_connect(): Can't connect to MySQL server on 'sql.datacolony.com' (4)
/hsphere/local/home/site/site.com/forum/includes/class_core.php on line 274
MySQL Error :
Error Number :
Date : Saturday, January 26th 2008 @ 07:53:05 PM
Script : [url]
Referrer : [url]
IP Address : 92.3.190.54
Username :
Classname : vb_database

The server is running CentOS 4.6, PHP 4.4.7, MySQL 5.0.45. The vBulletin software has been patched to the latest version. The vBulletin people are not sure why this could be happening.

Well we never believed that the firewall was causing the issue BUT it only started happening on the day the new firewall was installed. So we tried stopping the firewall for a full week and the MySQL database errors stopped happening, completely. So I'm convinced the problem is the firewall blocking MySQL connections but I can't figure out why?

There are no entries in the MySQL .err logs pertaining to this. Can't figure this out, any help or ideas is appreciated since the people who installed the firewall are not sure either.

View 3 Replies


ADVERTISEMENT

Will Bastille Work With The APF Firewall

Apr 25, 2008

Will bastille work if my server already has the APF firewall?

View 0 Replies View Related

Mysql Causing High Iowait

Apr 12, 2008

Server is Xeon 3060, 3GB Ram, 250GB SATA-II HDD. I followed the recommendations made by mysqlprimer tuner script.

top - 11:54:33 up 237 days, 15:01, 1 user, load average: 6.06, 2.80, 1.65
Tasks: 133 total, 2 running, 131 sleeping, 0 stopped, 0 zombie
Cpu(s): 13.0% us, 4.9% sy, 0.0% ni, 24.3% id, 57.8% wa, 0.0% hi, 0.0% si
Mem: 3114144k total, 3096468k used, 17676k free, 30220k buffers
Swap: 2096440k total, 32348k used, 2064092k free, 2515412k cached

PID USER PR NI %CPU TIME+ %MEM VIRT RES SHR S COMMAND
8610 nobody 16 0 28 1:37.73 0.7 78908 20m 16m S lsphp4
10520 nobody 16 0 3 0:01.97 0.4 78788 10m 6884 S lsphp4
26474 nobody 15 0 2 15:04.07 0.4 14196 11m 3216 S lshttpd
28275 mysql 22 6 1 131:28.83 7.4 733m 224m 2700 S /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pi

Code:
[mysqld]
max_connections=500
max_user_connections=300
skip-locking
skip-innodb
query_cache_limit=1M
query_cache_size=64M
query_cache_type=1
interactive_timeout=60
wait_timeout=60
connect_timeout=6
thread_cache_size=128
key_buffer_size=640M
max_allowed_packet=16M
table_cache=2048
join_buffer=1M
sort_buffer=2M
record_buffer=1M
sort_buffer_size=2M
read_buffer_size=2M
safe-show-database
max_connect_errors=10
thread_concurrency=2
myisam_sort_buffer_size=64M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
#log_slow_queries=/var/log/mysql/mysql_slow-queries.log
long_query_time=3
tmp_table_size=32M
max_heap_table_size=32M
#log-queries-not-using-indexes=/var/log/mysql/mysql_queries_no-indexes.log
join_buffer_size=2M
low_priority_updates=1
read_rnd_buffer_size=2M

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
var/lib/mysql/mysql.pid
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer=32M
sort_buffer=32M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=32M
sort_buffer=32M
read_buffer=16M
write_buffer=16M

[mysqlhotcopy]
interactive-timeout
Whenever there are a lot of members online on my forum, the iowait shoot up, >30% and often times hovering at 60%. It'll eventually drop down to normal levels. However, during the high iowait, there are over 2.5GB of free memory according to the command, free -m

is it due to mysql not optimized or other processes? I don't think the bottleneck is on the cpu or ram.

View 12 Replies View Related

MySQL ERROR, Hosting Or My Script Causing The Troubles

Jun 5, 2008

I hosted one aardvark topsite @ PluginSpace.com which consist of high traffics (3500+ unique visitors/day). I'm facing max_users_connection for quite number of times and I also have complain to my hosting but I still get no luck, they fix my problem for a short period and the problem appear again after some time.

I rent myself a dedicated server with 320GB Space and 3400GB Bandwith and 2GB RAM. Everytime I manage to get a lot of traffics to my topsite, maybe 100+ online users at a time, tracked by freeonlineusers[dot]com. I'll got these errors. Can anyone tell me what can I do? Can anyone tell me more about how much visitors can a normal dedicated server handle? Is it my script problem or my server problem?

(ERROR WILL POST IN NEXT POST)

can the dedicated server stand many visitors or suppose a normal dedicated server can handle so many visitors or my hosting maintenance is poor?

View 13 Replies View Related

Plesk 12.x / Linux :: Postfix Errors - Connection Refused

Dec 16, 2014

When i am issuing systemctl status postfix.service i am receiving the following error. I am actually trying to install opendkim and i found this.

Code:
warning: master_wakeup_timer_event: service pickup(public/pickup): Connection refused

And this is the output of ls -l

Code:
[root@h2376451 postfix]# ls -l /usr/lib/sendmail /usr/sbin/sendmail
lrwxrwxrwx. 1 root root 30 Dec 2 10:51 /usr/lib/sendmail -> /etc/alternatives/mta-sendmail
lrwxrwxrwx. 1 root root 21 Dec 2 10:51 /usr/sbin/sendmail -> /etc/alternatives/mta

View 7 Replies View Related

Mysql Errors &

Sep 14, 2007

This is the second time this has happened last time my host fixed it and they should be right now but why does this happen to a server?

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/xxxxx/domains/xxxxx.com/public_html/includes/open_db.php on line 12
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

View 2 Replies View Related

Log All Mysql+php Errors

Feb 3, 2007

I'm running an IPB 2.2.1 Forum on a VDS, 512 RAM, DEBIAN SARGE, PHP4+Eaccelerator,MYSQL 4.1,Apache 1.3.

I get the famous ipb mysql error :

IPS Driver Error

There appears to be an error with the database.

You can try to refresh the page by clicking here

I don't know what thsi error come from, i want to log all Mysql/Php errors.

Ipb already log mysql errors in the /cache directory ..But there are no errors in ther, so i want to try server's logs.

View 4 Replies View Related

MYSQL Installation Errors

May 22, 2009

Im trying to get 64bit MYSQL 5.1 installed on a CENTOS 5.2 64bit box. But after a week of wrangling with it I just dont seem to be able to get it running. I have tried both installing via the MYSQL.com RPM's and via a added YUM Repo.

Below is my error log.

Quote:

090522 15:33:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
090522 15:33:04 [ERROR] Error message file '/usr/share/mysql/english/errmsg.sys' had only 472 error messages,
but it should contain at least 630 error messages.
Check that the above file is the right version for this program!
/usr/libexec/mysqld: Unknown error 1146
090522 15:33:04 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
090522 15:33:04 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
090522 15:33:04 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
090522 15:33:04 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
090522 15:33:04 InnoDB: Started; log sequence number 0 0
090522 15:33:04 [ERROR] Aborting

090522 15:33:04 InnoDB: Starting shutdown...
090522 15:33:05 InnoDB: Shutdown completed; log sequence number 0 46409
090522 15:33:05 [Warning] Forcing shutdown of 1 plugins
090522 15:33:05 [Note]
090522 15:33:05 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

View 5 Replies View Related

High Load And Mysql Errors

Jun 17, 2007

My server very slow and the is very loaded. How can I fix this problem? My server specialities and loaded softwares which are below. And sometimes there is "mysql connect failed", "Lost connection to MySQL server during query" errors. Thanks for kinds...

---
Speed:
100Mbs

LOAD:
Load avarage : 5-30 +
Cpu usage: %30-95 +
Ram usage: %70-95 +

SYSTEM INFO:
2gb ram, P4 3200 cpu, 2x250 GB SATAII hdd, Plesk 8.1.1, centos 4.5 os, apache 2.0.59, php 4.4.7, mysql 4.1.21(client),
mysql 5.0.41(server), zend optimizer, kernel 2.6.19.1.SM #5 SMP, mod_evasive, plesk firewall, qscanq+clamav,
spamassain and system up-to-date.

SOFTWARE:
phpbb 2.0.22
4images 1.7.4
joomla 1.0.12

ONLINE USER:
100-500 user online
on 2 website

How to optimization?

I installed tuning-primer.sh

but I can’t understand this code:
I don’t know. How to set values, example?
NOTE: Red value

-------------------------
[root@lavinya bin]# tuning-primer.sh

-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -

MySQL Version 5.0.41-log i686

Uptime = 3 days 4 hrs 34 min 17 sec
Avg. qps = 92
Total Questions = 25406284
Threads Connected = 1

Server has been running for over 48hrs.
It should be safe to follow these recommendations

To find out more information on how each of these
runtime variables effects performance visit:
.............

SLOW QUERIES
Current long_query_time = 5 sec.
You have 115 out of 25406302 that take longer than 5 sec. to complete
The slow query log is enabled.
Your long_query_time seems to be fine

WORKER THREADS
Current thread_cache_size = 8
Current threads_cached = 7
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 500
Current threads_connected = 2
Historic max_used_connections = 110
The number of used connections is 22% of the configured maximum.
Your max_connections variable seems to be fine.

MEMORY USAGE
Max Memory Ever Allocated : 835 M
Configured Max Per-thread Buffers : 3 G
Configured Max Global Buffers : 46 M
Configured Max Memory Limit : 3 G
Total System Memory : 3.96 G

Max memory limit exceeds 85% of total system memory

KEY BUFFER
Current MyISAM index space = 35 M
Current key_buffer_size = 32 M
Key cache miss rate is 1 : 73658
Key buffer fill ratio = 34.00 %
Your key_buffer_size seems to be too high.
Perhaps you can use these resources elsewhere

QUERY CACHE
Query cache is enabled
Current query_cache_size = 4 M
Current query_cache_used = 1 M
Current query_cach_limit = 1 M
Current Query cache fill ratio = 29.83 %
MySQL won't cache query results that are larger than query_cache_limit in size

SORT OPERATIONS
Current sort_buffer_size = 2 M
Current record/read_rnd_buffer_size = 1 M
Sort buffer seems to be fine

JOINS
Current join_buffer_size = 1.00 M
You have had 14127 queries where a join could not use an index properly
You should enable "log-queries-not-using-indexes"
Then look for non indexed joins in the slow query log.
If you are unable to optimize your queries you may want to increase your
join_buffer_size to accommodate larger joins in one pass.

Note! This script will still suggest raising the join_buffer_size when
ANY joins not using indexes are found.

OPEN FILES LIMIT
Current open_files_limit = 2500 files
The open_files_limit should typically be set to at least 2x-3x
that of table_cache if you have heavy MyISAM usage.
Your open_files_limit value seems to be fine

TABLE CACHE
Current table_cache value = 256 tables
You have a total of 636 tables
You have 256 open tables.
Current table_cache hit rate is 1% , while 100% of your table cache is in use
You should probably increase your table_cache

TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 2271787 temp tables, 3% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine

TABLE SCANS
Current read_buffer_size = 1 M
Current table scan ratio = 28 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio =1 : 112
You may benefit from selective use of InnoDB.
If you have long running SELECT's against MyISAM tables and perform
frequent updates consider setting 'low_priority_updates=1'
If you have a high concurrentcy of inserts on Dynamic row-length tables
consider setting 'concurrent_insert=2'.

[root@lavinya bin]#
----------------------

if your reply me message I will be happy

View 1 Replies View Related

Hide Php/mysql Errors On Live Domain

Apr 27, 2009

how can i stop php and mysql errors from being displayed on a live site. I'd rather just check the error log than have the errors displayed to all users.

View 4 Replies View Related

MySQL Connection

Jun 8, 2007

I have a database server – mysql.xx.com which is the main MySQL server in H-Sphere.

I've created a database from mysqladmin interface.

I can use the database without a problem but when I’m trying to access the database from another server that I’ve just installed, the PHP application says that it can not connect to the database.

Another thing is that if I move the php app with the same configuration file under a shared account under another H-Sphere server, it's working perfectly.

I’ve read the H-Sphere documentation about an option to enable remote access to the mysql server which I can’t find anymore under our H-Sphere 2.5 Patch 8.

I’ve done a lot of searching to see how can I make that PHP application to connect to mysql.xx.com but it seems that although I’ve run the command grant all …. Command for that database, it still doesn’t work.

One final thing – from that new server if I run "mysql –h mysql.xx.com –u user –p" I can connect to the database and do a use database, show tables etc.

From iptables on mysql.xx.com I see that it accepts connections from outside.

This issue of not getting that PHP application to connect to mysql.xx.com can be related to the fact that H-Sphere is using the server or what should I try further?

View 14 Replies View Related

MySQL Connection Fluctuates

Oct 1, 2009

I'm trying to diagnose where my problem is coming from.

I have a site hosted with Integra Telecom. The site is connecting remotely to a MySQL database hosted on Media Temple.

My problem is that the site's connection to the MySQL database seems to be fluctuating throughout the day. Sometimes the site is up, sometimes it's down.

When it was down, I got the error: "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"

So is the problem with Integra Telecom or is my problem with Media Temple?

View 4 Replies View Related

Mysql Persistent Connection

Nov 3, 2009

Currently mysql.max_persistent and mysql.max_links are set to -1 which means unlimited

to optimize mysql, should i keep this unlimited or is it good to limit this? If i have to limit it, what is the best value that I can put there?

View 4 Replies View Related

Windows - MySQL Too Many Connection..

Jul 15, 2008

I have win2003 server and running plesk 8.4, there is a website on it and it gives me error with mysql max_connection even I set the limit 1 million or 10000 no matters.

View 3 Replies View Related

Zymic.com MySQL Connection

Mar 18, 2008

We have a front end server for the website Zymic.com (a free web hosting community), a mysql server and a main server for hosted websites. The problem lies between establishing a connection from the Zymic.com server to the database server - to sum it up, the connection just "hangs". We have never had this problem before, never edited anything which would cause a problem, its completely spontaneous.

My administrator has spent endless hours trying to debug the problem, here are some notes he gave me:

1. Ping to the mysql machine works fine.

2. Telnet to port 3306 of the mysql machine works great too – meaning NOT a network issue.

3. Strace on the connection shows it hangs when it calls the server and waits endlessly for response.

4. The mysql machine listens to the IP and port 3306 and connects great to the hosting server via SSH.

5. It's NOT a max connection issue but something to do with the mysql socket itself.

Here is a test from another site on the server to the mysql server:
[url]

Code:
<?php
mysql_connect('75.126.138.74', 'wkscript', 'PASSWORD') or die(mysql_error());
mysql_select_db('domains_data') or die('SELECT ERROR : ' . mysql_error());
?>

View 10 Replies View Related

LiteSpeed - Connection To Mysql

Dec 21, 2008

I have setup LiteSpeed and I have got a problem with php and mysql.

It seems php can't connect to mysql. At every script which use mysql(like phpbb3, phpbb2 etc) I getting errors

SQL ERROR [ mysql4 ] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) [2002]
phpBB : Critical Error
Could not connect to the database

View 5 Replies View Related

Lost Connection To MySQL

Dec 7, 2007

MySQL Error : Lost connection to MySQL server during query

I get this error around 10 times a day and the MySQL server goes down

Here are my.cnf contents

Quote:

[mysqld]
safe-show-database
old_passwords
back_log = 75
skip-innodb
max_connections = 650
key_buffer = 48M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 3000
thread_cache_size = 128
wait_timeout = 90
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 64M
net_buffer_length = 16384
max_connect_errors = 10
thread_concurrency = 4
read_rnd_buffer_size = 786432
bulk_insert_buffer_size = 8M
query_cache_limit = 3M
query_cache_size = 48M
query_cache_type = 1
query_prealloc_size = 262144
query_alloc_block_size = 65536
transaction_alloc_block_size = 8192
transaction_prealloc_size = 4096
default-storage-engine = MyISAM

[mysqld_safe]
nice = -5
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M

[mysqlhotcopy]
interactive-timeout

View 3 Replies View Related

Max MySQL Connection On Shared Host

May 31, 2009

What is the standard number on maximum mysql connection on most shared host providers and which one give the highest number.

View 11 Replies View Related

Remove Server MySQL Connection

May 13, 2009

I bought a VPS to run a part of a application I have and it needs to connect to my database in cpanel. I have set everything up properly and allowed the remote server to connect to my server, I updated the DB connect file with the correct mysql server username and password. But when I try and run the script I get this error.

Quote:

Client does not support authentication protocol requested by server; consider upgrading MySQL client in

I'm not 100% sure what to do. I don't understand why it wouldn't work because it works perfectly on the main server with my scripts. But I get that error message on the remote server.

View 4 Replies View Related

Host For Remote MySQL Connection

Feb 21, 2008

I have developed a desktop system that uses MySQL data.

I want to use a host to access the data but my current provider only allows access to MySQL data via a web server.

Can anyone suggest a host that would provide direct connection to a MySQL database?

View 11 Replies View Related

Allow User To Remote Mysql Connection

Aug 15, 2008

how to allow user to remote mysql connection from his localhost ( in linux server with WHM )

my user wants to connect to the mysql from his localhost

View 7 Replies View Related

Lost Connection To Mysql Server During Query

Aug 12, 2007

some vBulletin customers facing to that error message, with session table with attachment only. Other just work fine. It's not because of server load. The load is just around 0 - 0.1

I have increased wait_timeout to 200 and max_allowed_packet to 64MB. Each attachment file in those vBulletin is just around 1-3MB.

Is there any idea why and how to fix?

View 1 Replies View Related

Cpanel Mysql Remote Connection USE EXIST DB

Jun 29, 2009

A have set up a cpanel with remote mysql server.

My demo config:

cpanel:

centos VPS with cpanel WHM (demo)

mysql:

debian VPS

the configuration is OK, it works.

We have got 200 customers, and we will to change to cpanel.

The MYSQL server is on a solaris zone. It is possible to make the remote connecting with it. I will import the 200 users MYSQL databases to cpanel, with privileges (user settings). The mail/web dir a will import manuali to cpanel server(copy-paste-setuser:group).

View 0 Replies View Related

Connection To MySQL Hangs 2-3 Times/hour

Jan 10, 2007

I just got a new server and discoverd very strange problem. It happends 2-3 times every hour. When I try to access some webpage which connects to MySQL, I get page header and then page hangs for some 1 minute. After some 1 minute everything is back to normal. I can open several windows with different websites hosted on my server and the same problem is in all windows. At the same time I can access al websites without MySQL connections.

I have Fedora Core5
MySQL version 5.0.27

View 1 Replies View Related

MySQL Remote Connection Problem After A Heavy Usage

Aug 8, 2008

I have 2 identical Fedora8 boxes with Apache 2.2.8, MySQL 5.0.45 and PhP 5.2.4. I use one as the Web+DB server (say box A), and the other (box B) just as the Web server connecting to the DB server on box A. I use this 2 machine configuration to test a LAMP based-Web application. I have a client program on other machines that can emulate a massive web workload to these 2 servers; it can emulate hundreds to thousands of users using the application simultaneously.

Before running the test, the connection to the DB server from both boxes seem fine. Using the mysql client program on either box A or B trying to connect to the DB, the connection goes through instantly. In the /etc/my.cnf file, I have max_connections=4096 and max_user_connections=4096. Note that the web app uses one single db user to connect to the db. To allow remote connection, I inserted one record into the user table of the mysql db whose the host field's value is '%' (allow connection from all remote hosts).

After running the test (which I found out that many requests sent to box B failed), mysql client program on box A is still able to connect to the db instantly; but the one on box B has a problem: it takes extremely long (5 - 10 minutes or even more) to establish the connection, it doesn't time out, just takes that long. I believe that's the cause for the failure of requests to box B.

View 1 Replies View Related

Plesk 12.x / Linux :: Enable To Create New MySQL Database Server - Test Connection Failed

May 7, 2015

I freshly installed Plesk 12.0 on Ubuntu 14.04. Everything works accept the MySQL database creation.

When I try to create one, i get this error :

error: the test connection to the database server has failed because of network problems: connection refused...

View 1 Replies View Related

Email Errors - 550 Callback Errors

Feb 13, 2007

I'm noticed I was getting bounced email errors from a company I was sending email through and I further investigated this by running a dnsreport on my domain.

Turns out that it fails at Acceptance of NULL <> sender, Acceptance of postmaster address, and Acceptance of abuse address. The domain that I ran a test on is using a new IP that I had recently added to my Direct Admin server. None of the other domains on my server are having issues like this.

Is is possible that I need to do something to enable these new IP addresses in exim? I mean, exim obviously responds to that IP address, but it seems to be having some issues with it.

View 5 Replies View Related

Pure-ftp :: 425 Could Not Open Data Connection To Port 2535: Connection Timed Out

Apr 7, 2008

I have ftp server (pure-ftp). with firewall.

i allowed 20 and 21 port in "CSF" firewall

now when i or our client connect to the server connection done.

and the they fire dir or ls command they will receive error

"425 Could not open data connection to port 2535: Connection timed out"

what is the problem.i have already allowed passive port 2500:3500 then why i received this types of error

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved