2

We have magento 2.2.3 configured and has been working fine. Recently we had some issues with our smtp server (which is fixed now) but I notice there are too many PHP processes running all the time. and it slows down the server a lot. any ideas?

enter image description here

I think it may have something to do with the emails and it may be sending the emails it missed during the time our SMTP server had issues, I am getting sales@ourserver.com has exceeded its 24-hour sending limit. Messages to 252 recipients out of 250 allowed have been sent.

  • Please check the apache log or nginx log . See any boot attack happening or not – Amit Bera Feb 26 at 10:32
  • @AmitBera I think it may be related to emails – Sajid Feb 26 at 14:39
0

The majority of your php processes are sleeping - 348 vs 2 that are actively running, this generally points towards a script waiting on the DB or some other activity before they can complete.

You can use the process id (PID, column 1) as a reference to get more info, ie: the actual script that is running.

lsof -p {pid}

may contain more info, if your host provides an access log this may also have a PID you can use to reference whats running.

Generally I have also found that any new issue in an application can be traced back to the last change made to it. You could double check the SMTP fix as well.

  • I think it may be related to emails any ideas how can I mark old emails to sent (I have already set mail_sent = 1 in sales_order) – Sajid Feb 26 at 14:40
0
  1. Try to restart php & apache service if this doesn't solve the slowness issue then check your deployment mode. If deployment mode is default then change to developer if you are already in developer mode then disable cache from backend.

  2. If you have already done above then try to set production deployment mode which is fastest mode.

  3. Here is difference of modes available:

a) default: The default after-install mode: 
- Not optimized for production
- Symlinks to static view files are published to the pub/static
directory
- Errors and exceptions are not shown to the user, as they are logged to the filesystem
- Should avoid using it

b) developer: For development systems only:
- Symlinks to static view files are published to the pub/static directory
- Provides verbose logging
- Enables automatic code compilation
- Enables enhanced debugging
- Slowest performance

c) production: For production systems:
- Errors and exceptions are not shown to the user, as they are logged to the filesystem
- Static view files are not materialized, as they are served from the cache only
- Automatic code file compilation is disabled, as new or updated files are not written to the filesystem
- Enabling and disabling the cache types is not possible from the Magento admin
- Fastest performance

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.