When the connection is maintained, the query suddenly takes a lot of time one day
That's quite odd, but I can't really speculate as to what might be going on. When you say "the service" are you referring to the database server, or the python application? What does the query look like that went from 3 seconds -> 90 seconds? I'm almost positive that something in the Peewee code wouldn't be affecting this. The behavior should be effectively "stateless" -- you execute the query and do whatever with the results -- if it was a Peewee issue I'd think it would either be always slow or always fast.

So my guess is either it's the db server, pypy, or perhaps something else that may be going on inside your application. Going to close for now unless there is compelling evidence this is in fact a peewee issue, but please feel free to comment w/more details and I'll give it some thought.
I use pypy2.7, When I connect to MySQL, Because of the large amount of data, the paging query used took about 3 seconds to complete all queries at the beginning, but after about seven days, it took 80-90 seconds. When the service was restarted, it was restored. I don't know why, does anyone know?