Forums / General Questions / 2006 mysql server has gone away, What is the IP/domain for paypal API calls?

2006 mysql server has gone away, What is the IP/domain for paypal API calls?

Locked

Views: 1,808

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
21 May 2009, 6:24 PM
#1
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

2006 mysql server has gone away, What is the IP/domain for paypal API calls?

Hi, I get these intermittent '2006 mysql server has gone away' errors when doing funds captures with the PayPal Express module.

I've contacted my host and they asked for the IP/domain for the paypal API calls(or whatever the correct term is) so they can add a firewall exception in case that might be the issue.

Does anyone know the IP/domain for this?

Since the problem is intermittent, if anyone has any other suggestions please let me know.

Thanks.

21 May 2009, 6:40 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: 2006 mysql server has gone away, What is the IP/domain for paypal API calls?

They can get the IP from looking up the IP of "www.paypal.com"

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 May 2009, 4:29 AM
#3
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Re: 2006 mysql server has gone away, What is the IP/domain for paypal API calls?

Thanks for the reply, that seems simple enough, I thought the IP for the API calls might be something different.

Since the problem is intermittent and has only happened when doing something with the paypal module, do you think the problem might actually be with the paypal server and not my host?

22 May 2009, 6:31 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: 2006 mysql server has gone away, What is the IP/domain for paypal API calls?

Maybe. Maybe not. It's hard to tell when problems are intermittent.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Jun 2009, 6:55 AM
#5
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Re: 2006 mysql server has gone away, What is the IP/domain for paypal API calls?

I think I might need more help trying to determine what causes this as I'm still having this intermittent issue.
My webhost has added firewall rules for paypal, but this hasn't changed anything.

I have only received this error while in the admin part, not in the store end. And I've noticed I get this when viewing the order details for an order paid with paypal, when doing paypal funds capture, or just after logging in.

Here's a sample of the typical errors I received:

2006 MySQL server has gone away
in:
[SELECT * from zen_paypal WHERE zen_order_id = 4144 AND parent_txn_id = '' AND zen_order_id > 0 ORDER BY paypal_ipn_id DESC LIMIT 1]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

2006 MySQL server has gone away
in:
[select count(*) as total from zen_sessions where sesskey = '961e6411a2990e9f504b29xxxxxxxxxx']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
2006 MySQL server has gone away
in:
[SELECT * from zen_paypal WHERE zen_order_id = 4297 AND parent_txn_id = '' AND zen_order_id > 0 ORDER BY paypal_ipn_id DESC LIMIT 1]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

2006 MySQL server has gone away
in:
[select count(*) as total from zen_sessions where sesskey = '40be3cc1793c725985060bxxxxxxxxxx']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

When the error happens right after logging in I get the following:

2006 MySQL server has gone away
in:
[select * from zen_coupon_gv_queue where release_flag='N']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

Does anyone have any idea what might be causing this?

Thanks.

5 Jun 2009, 7:00 PM
#6
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Re: 2006 mysql server has gone away, What is the IP/domain for paypal API calls?

I'm thinking this most likely is due to an issue with paypal or the paypal mod.

I have noticed when I get the error, the page starts loading normally, it loads everything up to **Payment Method: PayPal **, the section after this is where the paypal transaction info is diplayed and that's when the error occurs.

Does anyone else have this exact problem? Do you know if it's a problem with the paypal mod or the paypal server?

Thanks.

5 Jun 2009, 7:37 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: 2006 mysql server has gone away, What is the IP/domain for paypal API calls?

It's not the module.
As described in the FAQ on the topic: https://www.zen-cart.com/tutorials/index.php?article=388 ...
ALL "MySQL server has gone away" messages are a result of something timing out while attempting to process the page.
So, if it was in the process of retrieving information from PayPal and took a long time, and then finally got back to your site but the server had closed the database connection, you would see the "has gone away" message.
Same thing happens when trying to get quotes from USPS if the USPS site is slow. Or anything else that tries to talk to external resources and takes a long time, or even takes too long to process right on your own store.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Jun 2009, 7:50 PM
#8
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Re: 2006 mysql server has gone away, What is the IP/domain for paypal API calls?

Sorry for the late reply.

Yes sir, like you mentioned, this is caused by a time out and the reason being the paypal server taking too long to respond.

I did contact paypal about this, the first time they kind of got a little defensive and said the problem was specifically due to ZenCart.
Then I contacted them again and gave more details and they admitted the paypal server "sometimes" (seems to me most of the time) takes too long to respond.

They said
"*If you know where ZenCart stores the API timeout value, change it to 30 seconds, or even 60 to be safe. This way if there is a delay, the transaction will still go through when you get the response. Any longer than that and there may be a larger communication issue at hand.
*

So I would like to ask you where to make this change if possible.

Thanks.

16 Jun 2009, 8:39 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: 2006 mysql server has gone away, What is the IP/domain for paypal API calls?

Near the top of the paypal_curl.php file is the setting for CURLOPT_TIMEOUT, which is set to 60 seconds already.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Jun 2009, 5:39 PM
#10
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Re: 2006 mysql server has gone away, What is the IP/domain for paypal API calls?

My host has the wait_timeout setting to 15 seconds, and unfortunately they don't change this setting for shared hosting.

Is there some other way to keep the connection alive longer or reconnect to accommodate for the paypal server taking too long to reply?

Thanks.