Tlanyan. Me/Redis-on-wi…

Redis is a high-performance in-memory NoSQL database, which is commonly used in server-side development software. Redis officially supports * NIx, BSD and other systems, but does not provide support for the Windows platform. Redis for Windows was developed by Microsoft, but Microsoft has suspended its support and maintenance. The Github repository for Microsoft Redis is Microsoft Live/Redis, the last version released was 3.2.100 two years ago.

A web search for “Redis Windows” leads to 3.2.100, both old and new blog posts and tutorials. Old software is fine, as long as it works. However, in practice, it has been proved that 3.2.100 on Windows will crash quickly under a large amount of data (more than thousands of keys), with the following error message:

Redis can still provide services if the window is not closed. When the amount of stored data grows to tens of thousands, Redis will pop up a second crash window, data access will be unavailable, completely hang.

According to the exception information thrown to find the cause and solution, the network search failed to find the cause and solution. Someone raised the issue in the official redis warehouse. The official said that this is a problem on Windows platform, please go to the Warehouse of Microsoft to raise the issue. But Microsoft is no longer maintaining Redis, I guess the guy who asked the question is also pretty upset.

Until a solution is found, we will have to endure: as long as we can continue to provide service, we will ignore the error. If it does, restart it. In order to deal with the fault in time, the platform operation was monitored, and the alarm was immediately notified when there was any abnormality.

One night preparing for sleep, received an alarm email, had to open the computer to deal with the problem. Unexpectedly, I called the police again half an hour later. After two consecutive times, there was a big fire. If we don’t solve the problem of Redis, we may not sleep well. Thinking that someone in an issue has previously recommended a version maintained by someone else, think about giving it a try. Look at the issue in Microsoft redis warehouse, the second one is. Originally Tporadowski maintained a version that was supported up to 4.0 (officially the current stable version). To his credit, Tporadowski is constantly maintaining updates, fixing bugs and synchronizing with upstream code.

I wanted to test before going online, but after another alarm, I decided to go online immediately to replace the 3.2.100 version in use. Shortly after using the new version, you see “fork operation complete” and “background saving Teminated with success” messages. It immediately feels right (the Windows fork problem was caused by EXCEPTION_ACCESS_VIOLATION was mentioned earlier). The fact shows that this version of Redis is very stable. Up to now, the output information of the window is all normal, there is no crash, and the annoying alarm email has disappeared.

conclusion

If you’re having problems with redis 3.2.100 on Windows, try the tporadowski maintained redis at github.com/tporadowski… .

reference

  1. redis.io
  2. Github.com/MicrosoftAr…
  3. Github.com/tporadowski…