Rxjs getting stuck

66 views Asked by At

We are using RxJS in our project. We have created a framework which fires APIs to get the data (paginated APIs), convert the data into our own format and saves that data into the database. The whole framework is using RxJS to process the data at every stage.

The issue we are facing is that sometimes it get stuck somewhere and nothing happens afterwards. It should throw an error if something goes wrong but it doesn't.

Its getting executed by an agenda job and because of that its holding up an entire container until it gets timed out (We have added a hack to stop this processing if its stuck after 12 hours of waiting). I won't be able to share the code. I know without context, its almost impossible to figure out what's wrong but I just wanted to know the known issues and scenarios which can cause this issue like if its receiving null/undefined in mergeMap/concatMap or any RxJS operator, etc.

RxJS Operators we use most - mergeMap, concatMap, catchError, map, tap, filter, queueScheduler, scheduled, forkJoin, from, Observable, of, EMPTY, concatAll, toArray, firstValueFrom, lastValueFrom, reduce, groupBy.

If you have experienced the same issue then I would love to hear how you fixed it. Thanks!

RxJS version - 7.5.6
Node version - 18.12.1

0

There are 0 answers