Zen Cart Logo
Forums / General Questions / Better Error Handling when getting timeouts from USPS or UPS?

Better Error Handling when getting timeouts from USPS or UPS?

Locked

Views: 1,788

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
3 Mar 2009, 8:00 PM
#1
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

Better Error Handling when getting timeouts from USPS or UPS?

Running 1.3.8a with UPS and USPS.

I have been intermittently getting the infamous "2006 MySQL server has gone away" error.

I do think it is related to my apache / mysql server timeout configuration (or may be packet / buffer size) when contacting UPS and USPS for shipping info. I have my hosting company looking in to this now.

However, it brought up the question. Is there a better way to handle this type of error rather then having it sent to the customers browser?

Is there a way to have Zen display a "UPS or USPS Not Responding" message if one isn't received in a timely manner?

Thanks

3 Mar 2009, 8:46 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Better Error Handling when getting timeouts from USPS or UPS?

I will let the devs respond for a positive answer but as this is a general mysql failure message I would expect not without additional errortrapping code for these modules

3 Mar 2009, 9:19 PM
#3
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

Re: Better Error Handling when getting timeouts from USPS or UPS?

Thanks kobra,

I hope one of the Zen Development Team members will chime in!

May be someone with more server experience then me can suggest what specifically I can change on my dedicated server!

4 Mar 2009, 1:25 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Better Error Handling when getting timeouts from USPS or UPS?

What is your 'mysql.connect_timeout' setting in your dedicated server's php.ini file?

4 Mar 2009, 2:33 AM
#5
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

Re: Better Error Handling when getting timeouts from USPS or UPS?

The Zen server information shows mysql.connect_timeout is set to 60 for both local and master value.

However, logging in to the servers whm, it shows under the PHP Configuration Editor a value of 5.

I guess I would have to go with the actual Zen info of the vhost that Zen is running under...what do you think?

What value should it be?

Thanks

4 Mar 2009, 3:05 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Better Error Handling when getting timeouts from USPS or UPS?

I suppose you could try increasing it in WHM. You'll likely have to restart Apache afterwards.

4 Mar 2009, 4:33 AM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Better Error Handling when getting timeouts from USPS or UPS?

There are several somewhat inter-relating settings for this in /etc/my.cnf

4 Mar 2009, 6:39 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Better Error Handling when getting timeouts from USPS or UPS?

Care to elaborate?
I looked at a few my.cnf files and didn't see anything that looked like it dealt with connection timeouts, hence the suggestion to look at php.ini since it drives the client connector.

4 Mar 2009, 6:56 AM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Better Error Handling when getting timeouts from USPS or UPS?

one of the my.cnf's with settings blank but these are the fileds highlighted

[mysqld]
datadir=/var/lib/mysql
skip-locking
safe-show-database
query_cache_limit=
query_cache_size=
query_cache_type=
max_user_connections=
max_connections=
interactive_timeout=
delayed_insert_timeout=
wait_timeout=
connect_timeout=
thread_cache_size=
key_buffer=
join_buffer=
max_connect_errors=
max_allowed_packet=
table_cache=
record_buffer=
sort_buffer_size=
read_buffer_size=
read_rnd_buffer_size=
thread_concurrency=
myisam_sort_buffer_size=
server-id=

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

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

[mysqldump]
quick
max_allowed_packet=

[mysql]
no-auto-rehash
4 Mar 2009, 7:23 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Better Error Handling when getting timeouts from USPS or UPS?

hmmm ... yes, it would be interesting to know the effect of those vs the php.ini settings affecting the PHP Connector

4 Mar 2009, 3:53 PM
#11
kwright avatar

kwright

Zen Follower

Join Date:
Nov 2004
Posts:
355
Plugin Contributions:
0

Re: Better Error Handling when getting timeouts from USPS or UPS?

Unfortunately, I will need to wait until it starts to error out again, then try increasing the whm from 5 to may be 60 and see what happens...

I may be switching dedicated server hosting companies, for different reasons.

Thanks