TLDR 32lichunjia encountered delayed message delivery between Facebook and Chatwoot. sojan_official suggested checking sidekiq queue. The issue eventually resolved itself.
Since I have kinda heavy traffic on Website-Chat inboxes, nginx.conf has been modified as below:
Since FB Webhooks receive HTTP 503, I've tried to modify puma.rb to increase workers as below. But seems like it doesn't help:
From Nginx access log, it can receive POST request at /bot endpoint. <@4K257a> told me to check if it's taking time to create record, but I'm not quite sure how to do that.
If more information is needed, I'm willing to prepare. Could anybody please kindly give some help?
Update: I'm testing the issue today. I can receive Facebook message on Chatwoot immediately, untill another FB user send message from Facebook. I cannot receive message from the second user and my message can also not be received on Chatwoot after he sends message.
From syslog, it kept showing the following 3 errors:
32lichunjia none of the errors seems to be related specifically towards facebook. Could you check the status of your sidekiq queue and see if there is a lot of pending jobs ?
Hi sojan_official , this error seems not happening these days. Thanks for offering more clues.
32lichunjia
Wed, 14 Dec 2022 02:24:07 UTCHello, I'm using Ubuntu 20.04 to run Chatwoot on GCP. Self hosted env OS: Ubuntu 20.04 I've followed the instruction to set up Facebook (https://www.chatwoot.com/docs/self-hosted/configuration/features/integrations/facebook-channel-setup), and it works in the begining. I could send and receive message from both Facebook and Chatwoot. But it takes about 10-60 mins to receive message from Facebook on Chatwoot recently. Sometimes, no message is delivered from Facebook. This situation has last about 2 weeks. Facebook APP shows that the Webhooks from Facebook kept receiving error: HTTP 503 Failed to connect to server.