NetDevelopersPoland / NetDevPLWebsite

MIT License
22 stars 24 forks source link

Blog post from a specific blog not displayed #75

Closed kamil-mrzyglod closed 6 years ago

kamil-mrzyglod commented 7 years ago

Hi,

is there any possibility to get some idea why blog posts from my blog are not displayed on the website? :) I've checked this locally and RSS feed returns correctly formatted output - all blogs are displayed correctly.

Maybe there's some issue in MongoDB? I saw this issue on other blogs also, but it disappeared after a day or two. In this particular case it lasts a month at least.

What is more initially it worked flawlessly.

Best regards, Kamil

pawlos commented 7 years ago

It looks like it's working ok now - closing.

kamil-mrzyglod commented 7 years ago

@pawlos It appeared again yesterday after update - no idea what's wrong :)

pawlos commented 7 years ago

@kamil-mrzyglod yeah, I can see that. What update are we talking about? The update on your page or this one?

kamil-mrzyglod commented 7 years ago

I believe two things happened since yesterday(correct me if I'm wrong):

Personally I think that something happens when a background job regarding blogs runs, but I can't point an issue.

meaboutsoftware commented 7 years ago

It is happening from time to time. Personally, I think that it might be caused by temporary unavailability of RSS channel while the background job is running. Then no data will be fetched.

Of course, right now this is a guessing from my side. As I did the original version of RSS fetching for blogs, I will try to take a look at this problem at weekend.

kamil-mrzyglod commented 7 years ago

@jedmac It's perfectly fine. If you find something related to this problem please let me know, I'm willing to help here.

pawelklimczyk commented 7 years ago

how about adding a unit test and check how system behaves when RSS is not available ?

meaboutsoftware commented 7 years ago

@pawelklimczyk unit tests are a good idea in this area for documenting but not for checking how the system behaves - this is clear, when RSS is not available or there was a problem it returns an empty enumerable. But we can add some logging there within a try/catch. As I said before, I will take a look on it during the weekend.

pawlos commented 7 years ago

@jedmac what's the state of this one?

Lazys commented 6 years ago

I've added my blog yesterday (poznajprogramowanie.pl) and the same problem occured.

On localhost everything works correctly: netblogs

Is there any possibility to check out logs from production? I've looked to config files and it seems like Nlog logs everything to console. Am I wrong?

pawlos commented 6 years ago

@Lazys I can see posts there. I think there's a short delay between check-in and when the posts appear on the page. I would close this one if no-one is working on it

Lazys commented 6 years ago

@pawlos ok, I see them too right now.

pawelklimczyk commented 6 years ago

@Lazyr @pawlos the blogs are updated periodically

There is a background job BlogsUpdateJob that is executed every 8 hours. That's why new blog entries appear with delay

meaboutsoftware commented 6 years ago

As mentioned before - when job runs and there is a probem with reading RSS or unavailability of blog, then no posts will be shown. We can think about scheduling this job each 2 hours or caching - when there is empty enumerable returned, check if there is old content available and show it instead of nothing. @pawelklimczyk what do you think about it?

pawlos commented 6 years ago

Well it's kind of tricky thing. If the blog/rss is unavailable does it make sense to display old posts? Links will be broken anyway. I would rather hide those that are empty so that they are no blank spots.

meaboutsoftware commented 6 years ago

Not exactly. Current problem is that if during the update job, blog/rss iss unavailable, then it shows empty content. But for sure there is a situation when after 1h blog is working again and then the content needs to wait another 7h to be updated. Old links will not work only if blog is unavailable while clicking on the link. In all other cases we could show then old, cached version as links will not change.

But hiding would also be an option and I also like it.

pawlos commented 6 years ago

Well my understanding is this. If RSS is offline then blog is offline too. Maybe it will be back in one minute, maybe not. Maybe it will be offline for two weeks.

I think the issue here is that the scheduler is set to 8h - don't know why @pawelklimczyk chose such big interval. 1-2h should be ok so that we do not request too often but also give the nice refresh rate of the content.

I would go with this:

In the future (when user accounts are present) give admin the ability to re-run the job.

pawelklimczyk commented 6 years ago

I've changed interval to 2h and added retry for blog retrieval.

So now if blog rss is not accessible several times empty list is returned (as it was)