lua-cassandra icon indicating copy to clipboard operation
lua-cassandra copied to clipboard

Connection Pool in Single Host Module

Open shubhamfuloria opened this issue 2 years ago • 0 comments

Hi @thibaultcha, I've been trying to create connection pool in single host, but not able to do so. The things I tried are :

  1. setkeepalive(timeout, size) : It just closes the connection from database, I was expecting the connection would remain connected with database.
  2. connect() function: As per lua-nginx module docs I tried adding a pool_size = 5 parameter in sock:connect() function of init.lua file (line 225). And I was expecting I'll have 5 connections with the database, but no.. only one connection was made.

Could you please give some example code which implements connection pool using this driver.

Thanks

shubhamfuloria avatar Aug 04 '22 10:08 shubhamfuloria