Orange-OpenSource / YACassandraPDO

Cassandra PDO Driver fork
Apache License 2.0
85 stars 32 forks source link

servers pool #54

Open Perfect-Web opened 10 years ago

Perfect-Web commented 10 years ago

How are the servers exactly used ? Are they selected randomly or as failovers ? I've been using this extension now with some scripts that run for over 2 min, as a doctrine driver and sometimes it work sometimes it doesnt.

My best guess is that sometimes somewhere it times out, however it doesnt throw any exceptions, which i'm sure is some sort of a bug

Skunnyk commented 10 years ago

If I understand correctly the thrift code, by default connection is made randomly based on server list provided to the driver. About log, you should enable PDO_CASSANDRA_ATTR_THRIFT_DEBUG to 'Turns on thrift debugging. This converts thrift messages into PHP warnings. This option can be passed into the PDO constructor in the fourth argument.'

I think I will update https://github.com/Orange-OpenSource/YACassandraPDO/wiki/Home/ documentation with default values for options.

Perfect-Web commented 10 years ago

Hey, i have added the PDO_CASSANDRA_ATTR_THRIFT_DEBUG attribute and doesnt throw errors, every error except the ones with timeout

ghost commented 10 years ago

I had the same problem, PDO_CASSANDRA_ATTR_THRIFT_DEBUG worked for me.

Try check your apache error.log, maybe errors are there.

Perfect-Web commented 10 years ago

i think i know what caused this, PDO::ATTR_PERSISTENT => true, was the problem, without it, works ok