I have two services on my cpanel, godaddy. One is API which has been developed in Codeigniter another is Admin Panel which is developed in Laravel. Both share same mysql database.
API is used to provide information for android and iOS devices.
Whenever I send notification from laravel, API doesn't respond.
When I send notifications to user, the number is around 10k+, ntofication is also saved for every user in notification table.
I thought maybe that's why it doesn't respond and unable to handle both requests: from api to return query responses and saving notification in database.
It's not the case because I commented out the code that saves the notifications in database yet api calls are not being responded.
I also tried queuing the notifications saving in the database using laravel queues and redis too, but It didn't help.
Now I am confused and I can't figure out where the actual problem is.
Is there problem with the server; processing so many requests at the same time?
Can using queuing for sending notifications will help the issue? (Not the queuing saving in database process.)
Below is the server configuration :
4 CPU Cores
8GB Ram
200GB Disk Space
CetOS
Apache v2.4.39
PHP v7.0.33
MySQL v5.6.44
Please someone help, I will highly appreciate any help or suggestion.