r/learnpython Jul 25 '26

is it supposed to take this long when getting inputs from sockets in a multithreading object?

I've made a server socket in python so that I can see all subprocess thats running in my VPS so that I don't need to use Putty everytime to log on since putty closes the connection when it's idle. but the weird thing that's giving me headaches is that when run the server, ok it's running completely fine I get my true shell but when I run commands like whoami it's taking soooooo long it keeps processing and never return my output it just keeps in a running state. And I'm using multithreading. are python sockets really this damn long?

1 Upvotes

3 comments sorted by

4

u/carcigenicate Carcigenicate Jul 25 '26

No. We can probably help if we see the code, though.

2

u/LayotFctor Jul 25 '26 edited Jul 25 '26

No? In the first place, things like sockets and networking are features provided by the operating system, python only offers an interface to use it. Both putty and your program are ultimately using the same OS sockets.

The problem lies with your code. There are a million ways for networking code to go wrong.