Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to solve time out errors #578

Closed
MartijnOud opened this issue Sep 15, 2021 · 18 comments
Closed

How to solve time out errors #578

MartijnOud opened this issue Sep 15, 2021 · 18 comments

Comments

@MartijnOud
Copy link

  • API Version: 2.37.1

Hello! I'm unexpectedly getting time out errors when creating new payments. I'm not getting these errors consistently (maybe 40% of the time?) and haven't experienced this on similar projects on the same server so I'm having a hard time debugging this.

The error message:

[2021-09-15T15:10:40+0200] Curl error: Resolving timed out after 2516 milliseconds
--
[2021-09-15T15:50:53+0200] Curl error: Resolving timed out after 2512 milliseconds

I did find #470 with an example of how to overwrite the DEFAULT_TIMEOUT but since that is set to 10 seconds and mine times out after 2.5 seconds I don't think that will resolve my issue. The DEFAULT_CONNECT_TIMEOUT is set to 2 seconds so that doesn't appear to be it either.

Any advice on how to find out exactly what is timing out and how to resolve that?

@sandervanhooft
Copy link
Collaborator

Hey!

That's unfortunate!

If I understand your description correctly it's still possible to be the DEFAULT_CONNECT_TIMEOUT ?

Where is the server (geographically) located?

@sandervanhooft
Copy link
Collaborator

Ah wait, given the error message it looks like a dns issue.

@MartijnOud
Copy link
Author

Hi Sander, thanks for the quick reply!

I've been testing with manually setting the DEFAULT_CONNECT_TIMEOUT & DEFAULT_TIMEOUT really low (and really high) but I can't seem to replicate it at all today which is a bit frustrating. The server is a TransIP VPS hosted in Amsterdam. DNS would make sense but it looks like that's not easy configurable?

@sandervanhooft
Copy link
Collaborator

It sound like a hiccup at your DNS provider.

DNS issues are hard to trace/debug unless your dns provider has some sharable status monitoring.

I'll inform the Mollie team to keep a lookout for any known DNS issues, but from Mollie's side the monitoring shows no issues.

Closing this for now, let me know if it should be reopened.

@MartijnOud
Copy link
Author

Unfortunately, I'm still getting this exact issue occasionally. Like just now.

[2022-04-12T22:03:04+0200] Curl error: Resolving timed out after 2000 milliseconds

I bumped DEFAULT_CONNECT_TIMEOUT to 5 which still gave me issues, after setting it to 15 customers can at least finish the transaction now. Since creating this issue I've seen it on multiple servers (and DNS servers) but only rarely.

Is there a way I can more elegantly time-out when this happens?

@sandervanhooft
Copy link
Collaborator

@rares-mollie have there been any dns resolution issues lately?

@MartijnOud
Copy link
Author

I wrote some code that sends customers to an intermediary page that keeps retrying to get a checkoutUrl with ajax, but even this doesn't work. It just keeps timing out. Some customers get through. Most don't.

Object { error: "[2022-04-13T17:20:42+0200] Curl error: Connection timed out after 10001 milliseconds" }
Object { error: "[2022-04-13T17:20:52+0200] Curl error: Connection timed out after 10001 milliseconds" }
Object { error: "[2022-04-13T17:21:02+0200] Curl error: Connection timed out after 10001 milliseconds" }
Object { error: "[2022-04-13T17:21:12+0200] Curl error: Connection timed out after 10001 milliseconds" }
Object { error: "[2022-04-13T17:21:22+0200] Curl error: Connection timed out after 10000 milliseconds" }
Object { error: "[2022-04-13T17:21:32+0200] Curl error: Connection timed out after 10000 milliseconds" }
Object { error: "[2022-04-13T17:21:42+0200] Curl error: Connection timed out after 10001 milliseconds" }
Object { error: "[2022-04-13T17:21:52+0200] Curl error: Connection timed out after 10001 milliseconds" }
Object { error: "[2022-04-13T17:22:03+0200] Curl error: Connection timed out after 10000 milliseconds" }
Object { error: "[2022-04-13T17:22:13+0200] Curl error: Connection timed out after 10001 milliseconds" }
Object { error: "[2022-04-13T17:22:23+0200] Curl error: Connection timed out after 10001 milliseconds" }

Do you have any suggestions or workarounds for this?

No matter how much I love Mollie, being able to accept payments is a required feature for a PSP. I'd rather not look for alternatives but after a day of debugging and lost revenue, I don't see many other options 🙁

@rares-mollie
Copy link

rares-mollie commented Apr 13, 2022

@MartijnOud Please reach out to tech support so we can debug as your problem is persistent, not spurious.

From the previous messages I understand this is a problem most likely related to DNS resolution on your VPS. I would like to ask you to please provide your dns configuration (likely found in /etc/resolv.conf) and the output of dig +trace +stats api.mollie.com

@MartijnOud
Copy link
Author

Hi! Thanks for the advice. Just after sending everything over via the contact form it seems I've found the issue, I've re-issued the SSL certificate and things seem to be working again. Hopefully it keeps working!

@MartijnOud
Copy link
Author

Just wanted to update that this issue returned. This time on a different server. Unfortunately the only information I can find about it is this very ticket. I've now created a ticket with the requested information (response apparently will take a few days), but a week-long not being able to take payments is very painful. This seems very much like a Mollie issue to me.

Is there really nothing you can do to resolve or handle this more gracefully?

@Naoray
Copy link
Collaborator

Naoray commented Nov 10, 2023

Hi @MartijnOud,

I will bring this ticket to the attention of the mollie team and get back to you ASAP

@fjbender
Copy link
Contributor

fjbender commented Nov 10, 2023

From our end we don't have any similar reports so far - so from here it looks like it's pretty much isolated to your system. I understand it's frustrating to debug, but I don't think there is anything on our end that we can do to help.

Is it a TransIP VPS again? Have you reached out to their support? Have you tried reconfiguring your resolv.conf to try using a different DNS server, or hardcode api.mollie.com in your /etc/hosts? Alternatively, you could also try injecting a Guzzle HTTP Client with an appropriate CURLOPT_RESOLVE flag (api.mollie.com:443:34.111.71.221) for debugging purposes.

I mean, those are all Bad Ideas™ to have on for a prolonged time, but might help pinpoint the issue.

@MartijnOud
Copy link
Author

The transip support stopped at "try plesk repair all -y".

I get that you maybe don't hear issues with this often, but as you can see this isn't the first time I'm fighting to get Mollie to accept my payments. It worked for many months, and then just stopped working. There are no other issues related to dns, curl, or something like that.

I've created a support request (1873988) where I was asked for more information.

I can curl the mollie.com homepage, so it doesn't seem like a dns or firewall block or something to me. But I can try to hard code the dns, I've added to my /etc/hosts (and rebooted):

34.111.71.221 mollie.com

But that doesn't seem to change anything (I might have done something wrong though, this is new to me). I'm going to inject the guzzle client too to see what I can learn from that.

@fjbender
Copy link
Contributor

Thanks! Could you change your /etc/hosts entry to

34.111.71.221 api.mollie.com

reboot and try again, please?

@MartijnOud
Copy link
Author

No changes unfortunately, the same error returns ([2023-11-16T18:34:33+0100] Curl error: Connection timed out after 2001 milliseconds)

@MartijnOud
Copy link
Author

Last night at ~21:50 it started working again. I can't reproduce the issue anymore. The last change I made is the /etc/hosts but that was 4-5 hours earlier and like I said, that didn't seem to be the issue.

Any idea? Because it's baffling me and I'm scared it'll happen again.

@fjbender
Copy link
Contributor

I am as baffled by this as you are... Glad to hear it's working again, though.

@MartijnOud
Copy link
Author

It's not only baffling, it's also extremely dehumanizing that I can't get anyone in your organization to help or even care. Is there a monetary threshold that you need to cross before Mollie replies to your emails, or is this just a not-so-subtle way of telling me you no longer process payments?

For the record: this is 100% an issue on your end. I think you might have banned my IP or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants