H
H
hckn2019-01-02 19:33:06
JavaScript
hckn, 2019-01-02 19:33:06

A long operation (image conversion) blocks the server, what should I do?

It was time for tests and it turned out that when one long operation is performed (image conversion takes about 30-60 seconds), the entire server is blocked and it is impossible, for example, to log in to anyone at all.
What to do? Where to look for an error? How to be in that case? There is a lot of code. Wherever you can promises and asink aveites. Why is it blocking? How about non-blocking blablabla?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2019-01-02
@hckn

there is no error: this is a feature of the event loop - there should not be long operations because they block the entire stream.
convert separately from the main stream.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question