Http://localhost:8001/plugins sometimes give wrong response

We are using Kong open source version 1.5.1. We have built a custom plugin which requires to get all the plugins available in Cassandra db through admin api http://localhost8001/plugins. We have a total number of 1171 plugin. we have implemented pagination to query in chunks of 1000 plugins. But we are observing a strange issue where the admin api call to fetch 1st 100o plugins some time randomly returning last 171 plugin records. This happens randomly few times and our plugin does not work properly. Can I get some help here?