ERR_CONNECTION_TIMED_OUT ERR_CONNECTION_REFUSED [closed]

3

I'm developing a system that uses HTML, JS, PHP and MySQL. Pages have multiple AJAX calls to the bank. I have approximately 350 users today.

Lately I've been getting a lot of errors from:

  • ERR_CONNECTION_TIMED_OUT
  • ERR_CONNECTION_REFUSED
  • And others.

Users are also having these issues.

A basic overview of my system:

  • The system is hosted on LOCAWEB
  • I use SESSION
  • All queries are located in separate PHP files, as needed.
  • There are some functions that use file_get_contents() because I need to fetch user data from another site.
  • All pages have their own JS file to separate the functions I need.
  • I use the ADMINLTE theme as the base.


I ask:

  • What is the relationship of these errors to my system?
  • Is there a wrong setting in PHP.INI ?

NOTE: For local testing, I use WAMP, and never had any problems.

    
asked by anonymous 09.11.2016 / 15:05

1 answer

0

With only past information, you can not give a conclusive answer to what may be causing the system to slow down, but we can analyze point-to-point about your basic view of your system to help you discover and fix the problem: / p>

- The system is hosted on LOCAWEB

It's not up to me to speak poorly or well of Locaweb, but test on another server and if the other server does not give more error, problem solved.

- I use SESSION

I do not see a slow problem relationship with session usage, skip to next.

- All queries are located in separate PHP files, as needed.

The number of files used is indifferent. Jump to the next one.

- There are some functions that use file_get_contents () because I need to fetch user data from another site.

If the external site is slow or blocking your IP, there may be your problem. Try to isolate this code, test it and if possible see an alternative to this, such as using a webservice from that external site or having a user accessing the external site database - Everything will depend on your relationship with the person responsible for that site external.

All pages have their own JS file to separate the functions I need.

Indifferent. Jump to the next one.

I use the ADMINLTE theme as a basis.

Indifferent too.

Pages have multiple AJAX calls to the bank.

See how much time you make these ajax calls. Database is a costly resource. While using ajax alone has no impact on speed, check your queries. Sometimes you may be querying more than you need, it is good to use LIMIT in queries, limiting the number of records returned, and indexing the fields used in WHERE clauses.

    
31.12.2016 / 16:30