driesvints / vat-calculator

Handle all the hard stuff related to EU MOSS tax/vat regulations, the way it should be.
MIT License
1.2k stars 88 forks source link

Timeout option #36

Closed deStrO closed 2 years ago

deStrO commented 7 years ago

Hello,

Yesterday the VIES service was down and I had my website blocked on loading when I was using the class VatCalculator. It appear that the SoapClient was in kind of timeout as the VIES service was down.

Any luck to add a timeout param?

nicolasbeauvais commented 7 years ago

Same thing since this morning: screenshot-2017-01-23_14-53-38

I tried to add a connection_timeout parameter to the SoapClient constructor but it had no effect:

$this->soapClient = new SoapClient(self::VAT_SERVICE_URL, ['connection_timeout' => 5]);

@mpociot Any idea of a workaround for this?

Thanks!

AlinGhinoiu commented 6 years ago

Same thing yesterday.

kentdahl commented 5 years ago

Ditto today - http://sorry.ec.europa.eu/

The EUROPA server is temporarily unavailable We apologise for any inconvenience this may cause you.

driesvints commented 2 years ago

Is this still an issue with the new VATCheckUnavailableException that's thrown?

driesvints commented 2 years ago

Closing this issue because it's inactive, already solved, old or not relevant anymore. Feel to open up a new issue if you're still experiencing this.

pmochine commented 2 years ago

Unfortunately, I had the same problem yesterday. Does the "connection_timeout" code work? I ran my PHPUnit test and it took: Time: 04:19.413 to finish it, but my tests failed because VIES was down. For comparison, my test now takes about Time: 00:19.873.

Obviously I don't want my user to wait 30seconds or more until I throw out an error 🙈