Flask uses gunicon to start multiple processes, and the data returned by the page is inconsistent. Why?

forgive me, but I don"t know how to describe the title of the problem. My problem goes like this: a novice flask writes two pages, one uses a form to obtain data, such as entering 30, and the other returns data, such as displaying 30 and then hanging on the server. I started three processes with gunicon, but there was a problem. I entered 30 on two different computers, and then refreshed it in the display page, sometimes showing 30. Sometimes it shows 20. What is the reason for this? I get browser information as cookie and session (two computers have different systems, browsers) still can not solve the problem, anxious, ask for advice!

Mar.03,2021

A simple association, I don't know whether it's right or wrong, it's right to communicate.

what you need now is one page to enter data and one page to display data . Your result is that when multiple clients are running, the results are more random .

the running time of each process is closely related to the system and computer hardware. since you have started multiple processes, the completion time of each process is fast and slow, so the results you get should be random.

I suggest you try to get rid of gunicon.

Menu