We are running 3 gateway pods using the same volumes. The middleware path is ‘/mnt/tyk-gateway/middlewares/bundles’. Yesterday after deploying a new bundle of middleware, traffic from 2 pods was perfectly okay while all the incoming traffic to one particular pod started failing due to ‘error=“PyObjectCallObject failed” mw=CoProcessMiddleware’. Its a simple python plugin which is implementing host ip based rate limiting. Since the its an ‘auth_check’ hook, all the traffic from this pod started failing with 403.
There were no changes to plugin at all and the same plugin was working okay with other pods.
I have created a bug report as well, now wondering if I am missing some configuration
The worst part about this is that we finally went onto production with tyk just 3 weeks ago after few weeks of testing but had to roll it back because of this. Would appreciate any help with this.
I think you’re right in this. I’m just guessing but I think there was a race condition with downloading, extracting and loading the script which caused one gateway to end up with file handle to either a partially written file or an empty one.
The solution is to either start one gateway before the others so that it completes the download and extraction so that the shared directory is there and ready when the other gateways start or to give each gateway it’s own dedicated middleware file system.