3

I'm trying to use phpcassa on high-traffic website (using AWS), there is about 50 requests per seconds, but sometimes I'm getting the following error:

An attempt was made to connect to every server twice, but all attempts failed. The last error was: TException:TSocket: Could not connect to x.x.x.x:9160 (Cannot assign requested address [99])

What can be the problem here?

sasa
  • 2,443
  • 5
  • 23
  • 35

1 Answers1

0

You need to configure phpcassa's connection pool size and timeout limit. The exception can be caused by a number of things including running out of available connection in the conn pool, timing out because of network congestion or GC activity on busy nodes.

There is a discussion on google groups where it's suggested to use a smaller connection pool without retries where the timeout limit has been increased. I'd read the discussion, the driver developer goes through a number of options that can solve the issue.

Lyuben Todorov
  • 13,987
  • 5
  • 50
  • 69