<p>I have microservice for email sending in cloud function on some GCP project. On different GCP project i have Ecommerce application deployed with kubernetes. I want to send mails after some activity on ecommerce via my microservice i use pub/sub for communication. I have problem with publishing messages in celery tasks. When I publish message using managment command everything is ok, but when i trigger celery task from managment command there is a problem.
<a href="https://i.stack.imgur.com/VRhW5.png" rel="nofollow noreferrer">code image</a>
This will cause an error like in the picture below (Process &quot;ForkPoolWorker-10&quot; pid:276 exited with &quot;signal 11 (SIGSEGV)&quot;) But werid thing - message is being send, and recipient recive this message.
<a href="https://i.stack.imgur.com/HhDra.png" rel="nofollow noreferrer">error image</a></p>
<p>With other tasks there are no such problems. If i comment line &quot;
future =publisher.publish(topic_path, json_data.encode(&quot;utf-8&quot;))
&quot;
There is no error. I know signal 11 (SIGSEGV) is connected to memory but i already make my kubernetes machines stronger so i don't think this is the issue.</p>
<p><a href="https://i.stack.imgur.com/X9v4o.png" rel="nofollow noreferrer">Logs from GCP</a>
Weird is also why ForkPoolWorker-7 succeeded with this task, but 'ForkPoolWorker-3' pid:227 exited with 'signal 11'</p>

janek_axpo
<p>Ok, problem was with that publisher PublisherClient creating multi threads and celery don't work correct with threads.</p>
