Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Winsock error 10053 on vast majority of VPS providers
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Winsock error 10053 on vast majority of VPS providers

I am a developer of high-frequency trading software, and in the past couple of months, I have been trying to start using VPS to run my software 24/7 instead of my home PC. My software on average is consuming 10-15 mb/s (around 5 TB/month) of bandwidth and sends around 20-100 requests per second.

The main issue is that while it can run on my home PC network without any issues, nearly all VPS providers that I have tried, small and large, are severely rate-limiting my software's performance. Nearly all of my requests are being canceled, with "ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine" error message being spammed in the program's console. With that, I can only send around 5-10 requests per second without getting rate-limited.

When asking VPS providers for support regarding it, they have absolutely no idea, saying that it's my software that is causing the issue. However, if that has been the case, I wouldn't be able to run the program on my home network, or other people's home PCs.

Maybe bright minds here can enlighten us on what can be causing this issue, and if it's really my program's fault, or if VPS providers indeed do rate-limit requests/second that their clients
can send.

Comments

  • xTomxTom Member, Patron Provider

    You may need to check your CPU usage, for most VPS providers CPU resources are shared not dedicated.

  • @xTom said:
    You may need to check your CPU usage, for most VPS providers CPU resources are shared not dedicated.

    Hmm, my program actually doesn't use a lot of CPU, and I actually tried using monstrous performance CPU VPS to no avail.

  • ehabehab Member

    logs ? from all sources.

  • Show the error in event manager.

  • Would something like Greencloud's Forex lineup work for this - https://greencloudvps.com/forex-vps.php ? Seems like it may fit the usecase. The provider is @NDTN I use them for other services and they're great.

  • ehabehab Member

    @unsafetypin said:
    Would something like Greencloud's Forex lineup work for this - https://greencloudvps.com/forex-vps.php ? Seems like it may fit the usecase. The provider is @NDTN I use them for other services and they're great.

    i have and like NDTN but this is not related to question

  • @ehab said:
    logs ? from all sources.

    Well, from the software's console, it looks like this. I am currently trying to find the relevant log from the Event Viewer. Never used Event Viewer before...

  • @stefeman said:
    Show the error in event manager.

    I think it's an application-level error, so Windows Event Viewer doesn't have any error logs to show. I might make a detailed application log, but it will take a bit of time since I need to configure detailed logging.

  • hikehike Member

    are you connecting to a FIX api ?

  • @hike said:
    are you connecting to a FIX api ?

    No, it's a quite niche market for trading, and I don't think that the issue is with an external API, since the error only happens when I am using VPS.

  • It says host machine. the windows is aware that its virtualized and refers to the hypervisor above it.

  • @stefeman said:
    It says host machine. the windows is aware that its virtualized and refers to the hypervisor above it.

    Yep, that's what I am thinking as well. Not really something I personally can do on my virtualized version of Windows. Has to do something with the main server machine or even the networking configuration of an entire VPS datacenter.

    However, 1st or even 2nd level support has no idea what it is and just blames my own program for throwing these errors. :|

  • SirFoxySirFoxy Member

    @TimesAndPlaces said:

    @stefeman said:
    It says host machine. the windows is aware that its virtualized and refers to the hypervisor above it.

    Yep, that's what I am thinking as well. Not really something I personally can do on my virtualized version of Windows. Has to do something with the main server machine or even the networking configuration of an entire VPS datacenter.

    However, 1st or even 2nd level support has no idea what it is and just blames my own program for throwing these errors. :|

    Buy a dedi with KVM access and install a desktop edition and try it.

  • lc475lc475 Member

    Have you checked the network parameters in Windows such as MTU?

  • MaouniqueMaounique Host Rep, Veteran

    Maybe try installing in Linux with WINE or similar? I don't know if it would solve the issues, but a radically different setup might give more clues.

    Thanked by 1ehab
  • emghemgh Member

    Sent a PM

    Would like to offer a limited time free VPS on my new server

    Just to see if a fully new envirement fixes it

    I have to say though, I’ve experienced something similar

    I did a Python code that basically spammed API requests for a client where we tried to identify bottlenecks, so it was a simply stress test really

    When running it on my home PC, it crasched the site right away

    With both Vultr and Hetzner, even with bigger plans, not using a lot of CPU or RAM or even network, it just didn’t crasch the site at all. Didn’t send requests fast enough

    I just ran it locally and never troubleshooted more, but I’d still mention it ..

  • ehhthingehhthing Member
    edited May 2023

    High frequency trading

    Windows

    Python

    Truly the peak of business people.

    Thanked by 1emgh
  • emghemgh Member
    edited May 2023

    @ehhthing said:

    High frequency trading

    Windows

    Python

    Truly the peak of business people.

    Old-school yet dearing

    You can tell by Windows but likes to code

    Probably has a Thinkpad

    Also dosen’t ever use mouse in Excel

  • @ehhthing said:

    High frequency trading

    Windows

    Python

    Truly the peak of business people.

    Not all hft is Wall Street multi-billion markets. There are a lot of niche markets where Windows works just fine. Also, I guess you never used Python on an advanced level if you posted that?

  • Just stop using Windows. use Haiku. Works fine there so I heard.

  • ralfralf Member

    @TimesAndPlaces said: The main issue is that while it can run on my home PC network without any issues, nearly all VPS providers that I have tried, small and large, are severely rate-limiting my software's performance. Nearly all of my requests are being canceled, with "ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine" error message being spammed in the program's console. With that, I can only send around 5-10 requests per second without getting rate-limited.

    I don't really do any networking development on Windows, but googling suggests this error is usually from a timeout. Given that you're also seeing rate limiting, it could be as simple as sufficiently high packet loss to where you're trying to connect to, the MTU being too high as per the above suggestion (which is quite possible if your VPN is tunneled and an easy fix, even in Windows).

    My first hunch is just that they have a terrible route to where you're trying to connect to. Maybe ping/tracert it and see how much packet loss. Not sure if there's a windows version of mtr, but maybe try that if there is.

    The other possibility is that there's some kind of NAT going on, and there's sufficiently few packets that long-standing but idle connections are being forgotten. If that's the case, maybe re-work the application to send keep-alive packets by doing a pointless request every 60 seconds or so.

    In any case, if you drop a TCP connection, your app should re-attempt connection, preferably after a small delay, as there are many reasons why the connection could be terminated.

  • @TimesAndPlaces said:

    @ehhthing said:

    High frequency trading

    Windows

    Python

    Truly the peak of business people.

    Not all hft is Wall Street multi-billion markets. There are a lot of niche markets where Windows works just fine. Also, I guess you never used Python on an advanced level if you posted that?

    I'm not even sure what you mean by the latter half. I'm just saying that given that other HFT firms are currently at the stage where they're building their own data centers with private microwave radio links, writing their own userspace TCP/IP stacks, using only statically allocated memory to avoid the latency in malloc and such, it seems that running Python on Windows is a bit ... out of the ordinary.

    The crux of HFT is the "HF" part, so the implication here is that the lower latency, the better. I'm sure you could vastly improve the latency of your algorithms by rewriting them in a compiled programming language and running them on Linux in a nearby datacenter.

  • A quick check on stackoverflow shows a lot of coding mistakes causing this. I'm surprised you didn't just add debug to your code and see where and why it's timing out. The giveaway was that you through a beast server at it and it didn't make a difference.

  • @ehhthing said:

    @TimesAndPlaces said:

    @ehhthing said:

    High frequency trading

    Windows

    Python

    Truly the peak of business people.

    Not all hft is Wall Street multi-billion markets. There are a lot of niche markets where Windows works just fine. Also, I guess you never used Python on an advanced level if you posted that?

    I'm not even sure what you mean by the latter half. I'm just saying that given that other HFT firms are currently at the stage where they're building their own data centers with private microwave radio links, writing their own userspace TCP/IP stacks, using only statically allocated memory to avoid the latency in malloc and such, it seems that running Python on Windows is a bit ... out of the ordinary.

    AI crashing the world's financial markets in 3...2..1...

    It'll be something like "it made the most money in one day in history.... It then lost the most money in one day in history... "

Sign In or Register to comment.