I am not good at networking.
creating a simple python public server for my personal use, only need to use do_GET.
I have few devices to access it.
it works at the beginning, but after a while, or after requested by different devices.
it will not respond sometimes, it seems blocking by one of my devices or something else.
but nothing useful show in the console.
What you’re using is a VERY basic server. It doesn’t handle concurrent clients well. I would recommend trying ThreadingHTTPServer instead of HTTPServer, but even that isn’t really production-optimized, and definitely isn’t hardened for use as a public server. Instead, look into using a dedicated HTTP server like Apache or nginx, and using a proper web app library like Flask, Django, Bottle, etc. It’ll be a bit more effort to learn how to set that up, but it’s a very saleable skill, and you’ll have something extensible and much much more reliable.
(Why do I say this? Because, years and years ago, I set a thing up basically like you’re doing here, and it needed more and more extensions until it was an utter pain to manage. That was only used by trusted users on a LAN, so the security issues weren’t a problem, but it did make me regret not starting with Flask.)
It definitely is! That’s why simple options like http.server exist. But they’re not designed to be able to do everything, so when - like this - you run into problems, it’s usually better to jump to a proper server and application stack than to try to patch in better support within a non-hardened app.