apache / openwhisk-package-kafka

Apache OpenWhisk package for communicating with Kafka or Message Hub
https://openwhisk.apache.org/
Apache License 2.0
32 stars 43 forks source link

Do not re-use CouchDB client between processes #195

Closed jberstler closed 7 years ago

jberstler commented 7 years ago

In a multiprocessing environment, SSL connections cannot readily be shared between processes. As the CouchDB client may use an SSL connection itself, it should not be shared between processes.

A fix would be to give Database.py a proper __init__ function and require individual processes to instantiate their own DB client. Additionally, the client should be instantiated as a instance field for all Process subclasses that require it.