After taking over the Java project for the first time, I encountered a website performance problem after going online. To be honest, I am not very familiar with Java and have a cold feeling.
The customer's Intranet website is developed using Java + tomcat6 + Oracle9i. after the launch, there were more than two hundred customers, most of which were about 150 online. after the launch, the web pages on some machines of the customer were quickly displayed. however, it takes one to two parts to open a webpage on some machines. this is intolerable. the customer calls one by one. the headers are dizzy.
Some internal tests have been performed on the release line, and theoretically the performance will not be so bad. no way. it can only be determined based on the descriptions of customers and on-site implementers. (because it is the customer's intranet and confidential, remote login is not allowed ). I thought it was just launched and the concurrency was large. When the customer couldn't open the page, the page was repeatedly refreshed, which caused this phenomenon. so let the implementers explain this to the customer. finally, we can be quiet for a while.
Unexpectedly, just a moment later, the customer called again. First, he scolded me and said nothing, that is, there was a problem with our program. Then, he immediately solved the problem! The customer is a VIP customer of the company. Everyone depends on him to eat. What should I do? I can only promise.
For the initial symptom description, that information. at the moment, I cannot figure out which part will go wrong. check it from the beginning. the website performance is nothing more than the concurrency of the web server, the concurrency of the database, the IO operation volume, and the data throughput.
First, I declare that I am not familiar with Java projects. so I had to humbly ask the so-called experts from the company. the concurrency of Tomcat is first ruled out, and the company's previous projects also use tomcat, which has never encountered such a problem. oracle databases are provided by customers. that's what I paid. theoretically, the problem is not big. (the configuration and performance of the corresponding server should not be suspected ). where is the problem. is there a problem with IO processing.
Consider that the website is implemented using templates, but the corresponding templates are all cached. Some clients can solve this problem every time they access the website.
What's the problem? The more I think, the more dizzy. the customer is in another location. I saw the scene again. no way. You can only perform stress tests on the company's website to check if there are any problems with the concurrency of nearly 200 people. there is no problem with the final result. that means theoretically our program is okay.
On-site personnel are also troubleshooting the customer's on-site faults as planned:
1. I thought it was a problem with the customer's network. Finally, I used a simple test method to dial the network cable with a notebook. The network was very fast. The page was opened right away.
2. The website has stopped and static pages are used for testing. Slow machines are still so slow.
It is concluded that some users' machines have problems. let's talk to the customer directly. I didn't expect to say that there was a problem with the machine. the customer immediately said that all machines are in batches. the environment is the same. besides, I cannot take one of them for testing. to apply to the lead. there are a bunch of almost unreasonable answers. I explained to him that I didn't understand anything and had a lot to do. you only need to give me a solution. but he cannot touch his machine .......... people are going crazy. I don't want anything anymore. can only be seen on site.
The next morning, we arrived at the customer's organization. I tried it with my own book. No problem. Let's take a look at it again. There are also a lot of customers who visit the website online. looking at the customer's machine, it was really slow. A headache. I can only do my homework carefully. I will ask some details about the problem and operate on it myself. observe the results carefully. finally, I found that when a slow webpage appears, there is a flash at the top of the webpage, but the content on the flash seems to have appeared (it is estimated that a background is made with an image, and then the flash is put on it, I didn't see the specific code either. To be honest, I'm not interested in reading this), but there is another small icon in the Flash location, which is almost the small image when the flash plug-in is not installed, when the small image is not displayed, ie will immediately display the page data. I tried several other similar pages, all of which should be one or two different types, and SwF should be the same. probably this is the reason. Let the accompanying developers immediately release the Flash content and try again. sure enough, the slow machine can quickly display the content of the webpage.
The correct theoretical result is obtained. it should be a problem with the flash plug-in. the Flash plug-in of a slow machine is the same as that of my flash plug-in. The client version is relatively low, and the maximum version is 9. However, there is no problem with the Flash 9 version. others will be slow.
Check whether the theory is true. The customer finds a machine and installs a Flash 9 plug-in. we recommend that you upgrade the flash plug-in immediately. The answer is that there are so many machines that it is impossible to upgrade the flash plug-in. You need to adapt the program to the on-site environment. speechless, immediately turn flash into an image. (The converted image is too big to be distorted.) It can finally be freed.
Who can think of the problem is in this small flash, the client runs separately from the Intranet and Internet. so the machines are in the same batch, but some configurations are not the same. some flash plug-ins have not been upgraded. this causes such a slow problem.