How to deal with sporadic problem line

This line of thought that the problem is tricky enough, not wanted, line sporadic problem is really hurting

Some days I did not write the article, and today do not pull the code, there is no point talking about how much nutrition feelings and experiences

A really intractable problem

As a front-end closest to the user, often bear the brunt of problems, of course, if you will now also fills, Debug or what capture all means anyway, is its own problems to solve the problem, not their problem, but also facilitate pot thrown out. But if the project happens also high complexity and long links, related parties a lot, and this problem is even now the online issue, it is tantamount to troubleshoot large stones that appear on the track in a moving train, but do not know big stone will appear in which you say is not hopeless despair

Encountered such a problem how to do it? Of course not abandon it

Second, how to deal with

Try to find a path to reproduce

Although even now though is a problem, if the probability of reproduction is relatively high, try to find some internal association among these recurring phenomena, such as a weak network, rapidly repeated clicks, time-out operations, etc., need some experience and luck. If you will be lucky enough to find a path now, then congratulations, ah, this question from a sporadic downgraded to a problem will now Level problem. This time should be how do I need to teach you! ! ?

Code Possible Problem analysis, inverse must now push path

The first step above, you can let the students help test operation, while How about you, can focus on the analysis of your code, consider a variety of scenarios, vulnerability is not there, is not it cause problems, then push will come against now the path. If an inverse introduction to the path just to reproduce this problem. Well, shoot thigh fingertips to solve the problem, you can take to enjoy your afternoon tea

Improve monitoring logs

Worse, in addition to customer feedback online this issue (video screenshot as evidence, may not deny), the entire project team who can not reproduce the problem, or even to test the students a chance to reproduce, but also no time to let you capture debug log . You can not find clues on the analysis of the code, this time we should rely on the system log. You feel where necessary, print log upload log system, after all online users to the order, even if the probability of occurrence of only one thousand one percent, and is likely to gather some key information

After logging in with the version sent out for some time, it is time to analyze the logs, and an interface being given? A native of js api did not return? A data type or acquired with the expected return of inconsistency? Anyway, finally can be thrown to the pot

Log whole series logo link

Said earlier, the whole system of high complexity, the link is very long, if you collect the exception log, but did not receive a message back when you backstage students righteous go to module A, he checked after you log white look, you see, you see, I sent out a message, ah, there are other modules should be all right. Then you find a module B, module C, got the same answer, you say you can pan training and preparation who

This article is certainly not tell you dumped a pot of it, after all, the question of who are the project in question, as a project member, you have the owner consciousness is not, no matter what the problem, we must try to solve the positioning

This time, we not only need each module has log, also need to have a whole series can uniquely identify the link. In other words, early in the design, front and back as well as various related parties, to do this log system-wide link design. So if there are problems, there is a track to follow, it is easy to kick out the problematic aspects

Third, the summary

Even now solve problems, experience is essential, which requires slowly accumulated precipitation, nothing to say. Then the rest of the key, is to perfect the design of the system log, which requires the efforts of the entire project team, and you need a facilitator

In addition, the state of the program design is reasonable, considering the full exception path, but also very beneficial to prevent the occurrence of such problems, after all, is now either react or vue, are already facing the state, the data-driven programming

Guess you like

Origin www.cnblogs.com/baimeishaoxia/p/11800045.html