Webdriver.Chrome with HTTP server strange behaviour

I have a simple HTTP server with can get information from web and send it to Telegram.
And I faced with a strange problem - if I use Webdriver.Chrome only once and then my HTTP server freezes and couldn’t answer the request.
And I should restart server after every request.
I tried to remove the Webdriver call - then the server can accept new requests after processing the previous ones.
That is, the problem is exclusively in Webdriver.
I have tried different combinations of shutdown - driver.close() and driver.quit(). There is no difference in behavior. There are no errors or exceptions.

I don’t understand how to solve the problem.
Help me please )

Repl link:

from selenium import webdriver
from selenium.webdriver import ActionChains, Keys
from selenium.webdriver.chrome.options import Options
import time
import config
from replit import db
from datetime import datetime
from threading import Thread
import telegrambot
from tkinter import Tk
from PIL import Image
import os
from chromedriver_py import binary_path
from webdriver_manager.chrome import ChromeDriverManager

def setup( url ):
  chrome_options = Options()
  driver = webdriver.Chrome(options=chrome_options)