Home > Mobile >  Laravel functions time out and Jquery scripts response take along time
Laravel functions time out and Jquery scripts response take along time

Time:11-15

I build an online shop when my customers buy something from the shop, when they reach checkout, I use hyperpay API, so when they pay by visa, its a request from my server to hyperpay server then I have the result if it the success I send an email message to customer and store payment and products data in another server with api. not always but sometimes, my server stop after sending emails, or stop before sending data to the second server, or I get a response from hyperpay and the operation cut, I don't know why. So I think it's a time-out problem, but I am still not sure. and another problem, my jquery scripts response take a long time. so I want to know, the problem with my codes or from my server?

CodePudding user response:

There could numerous reason behind for that to happen. As per your info, it looks like the time to send the email is taking longer or sometime it halts. Then you can do this things step by step:

  1. Check laravel.log inside storage directory to check if any relevant information.
  2. If the SMTP or whatever means of connection you are using to send the email needs to debugged.
  3. You should send heavy tasks such as email sending to queue: https://laravel.com/docs/8.x/mail#queueing-mail so the other tasks can be executed without any problem while the SMTP call is being made.
  4. If none of this help, you should look into your both web server and mail server
  • Related