Beckilicki
Beckilicki

Reputation: 63

RxJs Subject not triggering subscription on production environment but works on development and test

Yesterday my team deployed our angular app to a production server after it has been deployed to test server.

The app works in development mode and test server, but on production server the subjects are not triggering their subscription. The same build that was published to test was published on production, there are no file differences.

Does RxJs request some system setup which I'm not aware of which can cause subjects not to work? I have no idea how to debug this nor what the reason for it not working might be.

Services that subjects are on are singleton, I do unsubscribe in ngOnDestroy block, and it works on test, so I don't think it is an issue in code.

Any help or tip in which direction I should go to discover why it doesn't work is appreciated.

Using angular 6.2.2.

Upvotes: 0

Views: 336

Answers (1)

Beckilicki
Beckilicki

Reputation: 63

We have managed to solve it a while back but I haven't posted the answer.

The issue was with SQL server read and write nodes having a tiny delay, which meant that after we sent a write to the write node we would trigger a read as soon as we get response back, but the read node didn't have the date updated yet (delay was couple of ms) so we got the same data again, which made us think the subscription didn't fire since we could see the value change in database but not the delay.

Upvotes: 2

Related Questions