why processlist list shows limited threads
I interpret your results to say that only 266 connections existed at that moment.  (If there aren't 500 users trying to connect, there won't be 500 rows in the processlist.)
Were you getting some error from other attempted connections not being accepted?  If so, what was the exact text of the error message.
266 connections, each running a query, is a problem.  I highly recommend you find the full text of the query (or queries) involved.  SHOW FULL PROCESSLIST may be useful if the queries were truncated.  Then show us the query, EXPLAIN SELECT ... and SHOW CREATE TABLE.  It is likely that some new INDEX (possibly composite)` would make them run faster -- and you might never see as many as 266 again.