laravel / passport

Laravel Passport provides OAuth2 server support to Laravel.
https://laravel.com/docs/passport
MIT License
3.29k stars 780 forks source link

the first query of passport to begin authenticate the user it tooks very slow #1652

Closed atrialabir closed 1 year ago

atrialabir commented 1 year ago

everything is fine in localhost but in the server, with 16 GB memory ram and 12 core CPU the first query of passport which want to authenticate the user takes a very long

Based on the Laravel telescope

image

notice the oauth_access_tokens has 26 rows and doesn't have a lot of rows and this query which is my first query to the database in all requests it took between 80 to 150 ms on average

I increase the InnoDB buffer pool size in MySQL to 512MiB and the memory limit for PHP is 256MB but It does not improve it

driesvints commented 1 year ago

We'd welcome PRs to make this faster, thanks.