-3

I have developed an Application in PHP, the application has complete User Management System along with Dynamic form creation feature , Data import,export feature and many more. I am using Mysql as a database. When i was doing testing on that application, it was working perfectly fine. Now i have deployed this application on the customer side and almost 50-60 user are running this application, its been two month and now they are facing some problem. They said some time application respond very late , and some time it took so much time to respond. For example to use this application user need to login into the application , now some time login feature perfactly fine and user can easly and some time it took a lot of time to login. I personally look into this and face the same problem. Now i am confuse where is the actual problem.

  1. My Applicaiotn
  2. Network Speed
  3. Sever
  4. LargeData in SQL

How can i get any clue that where is the exact problem.

3 Answers3

1

You're going to need to provide a LOT more information to get a decent answer. And in providing that data, you will almost certainly solve the problem...

In most database-driven applications, the database is the first place where performance issues arise, especially as the data scales. A system that works fine with just a few records in the database can grind to a halt when scaling up...

So the first thing I'd do is look at the database processes while people are using the system, and look for long-running queries. Optimize those queries, and rinse & repeat.

It may also be worth writing debug log statements around your database access logic so you can look at historical performance stats - this is useful if the client tells you that the system slowed down yesterday, but is running fine today.

If it isn't the database, you need to look at the PHP performance. You'll need a profiler (try XDebug) and look for bottlenecks in your PHP code.

If it's neither the database nor your PHP code, you may have a configuration problem with your web server software (Apache or whatever you're using). This is hard to debug - you'll need to trawl through the configuration files and look for limits (e.g. "MaxConnections").

If it's not those things, the network may be the problem. This is pretty rare - if the network can't support a web application, file sharing, email and video conferencing will all suffer too. Ask your client if this is the case. To prove or disprove, put a decent size file on your webserver (a 20MB MP3 file should do it) and test how long it takes to download it while the application is running slowly.

Community
  • 1
  • 1
Neville Kuyt
  • 29,247
  • 1
  • 37
  • 52
0
  1. If it is the the problem with your application, try optimizing the code. This point becomes irrelevant as the code is not provided.
  2. Try pinging the server and check the response time. If it is normal then there is no issue with the network.
  3. Check the Server's H/W configuration(both application and mysql server) and if the H/W configuration of the server is low for the application to run, kindly upgrade.
  4. THIS IS MOST LIKELY TO BE THE SOLUTION: If your mysql has a large amount of data, try indexing the database. For instance you had problem with logging in, so try to indexing the usernames in your "users" table.

To be frank the data provided in the question is insufficient to come up with a concrete solution.

Abhay Pai
  • 314
  • 4
  • 17
0

If the speed of your application was correct when you deployed it initially, I suppose that the problem will be the database.

Is your database normalized? Do you have the correct indexes? You can try indexing all the columns that you use in the WHERE clausules.

But, as Abhay Pai said, the data provided is insufficient to solve this problem.

mHouses
  • 875
  • 1
  • 16
  • 36