Ways to troubleshoot a connection (works for some, doesn't work for others) - ruby-on-rails

I've got a site that's currently in beta and thus password-protected (sorry, can't show yet). Most of my users access the site no problem and able to interact with it, upload files, ..etc. There's one guy, however, who seems to have a persisten issue with access. Whenever he accesses the site, the connection times out and Heroku sends back an app-not-available response. Better yet, that screws access to everyone else at that time and I have to wait for the service to restart. Heroku logs show no sign of any issues. New Relic logs are also fine.
Do you have any suggestions on how I could troubleshoot , what tools I could use to monitor?

I have also had issues like this with heroku from time to time, and they have blamed in on EC2 when I contacted them. However, this has only happened to me twice and hasn't happened in months.
I tweeted #heroku and #salesforce with the problem when I got a snarky remark, and it got me in touch with someone who was actually able to help me. Sometimes they can be quite standoffish :)

Related

Are there any situations (e.g. failures) when browser clears cookies on its own?

We have two sites with different subdomains. Sometimes our employees lose their cookies (they are just gone) on both domains at the same time so they get logged out.
I don't really see how our app can be responsible, because we have different server configurations (and for each site there're multiple servers btw). I guess only nginx versions (1.10.3) are the same. Plus this does not explain why do they get logged out on both sites at the same time.
If it helps, we use rails (3/5), unicorn (4.8.3/5.3.0), on older app sessions are stored in redis and in the new one in cookies.
So I wonder maybe there're some browser (security) policies when it clears cookies. Maybe on some ssl connection error, ip changes or whatever.
I understand that this is not definitive problem description but it seems like magic to us atm so I hope that someone encountered something like this.
P.S. btw we tried to ask one of our employees to use firefox instead of Chrome (that is used by all of them) but it does not seem to be making any difference (he wasnt logged out for a week but then he was like every 20 minutes)

Heroku app does not respond at all anymore

Eventually a request to access the app will timeout within the browser.
Nothing was changed to the app. Yet suddenly it went down several hours ago.
The heroku logs show no attempt being made to request it.
I can restart it, and deploy to it, yet nothing changes.
I assumed maybe a service is causing this, but I stripped it of any 3rd party vendor calls and it still doesn't respond to me trying to access the site.
Does anyone have any insightful ideas on where to go from here? I'm sorry for how vague this question is..
is your DNS down? use host command to check it or visit the app using *.herokuapp.com

Heroku advertisement banner?

This morning when I opened my heroku app in the browser, I noticed a banner advertisement was placed on the bottom. I added an instance (as to not be a free plan) and restarted my server, and it was still there.
I dug through their knowledgebase and stackoverflow, can't figure out how to remove these. Right now I am removing them with JS, but the goal is to not receive the extra load / advertisements.
Heroku will not inject adds into your site whether it's free or not. As mentioned in comments to your question, you should check whether it's something that's done by the network you're on. Maybe try accessing your site using https (i.e. https://paddlar.herokuapp.com/rivers) - with that, the network should not be able to modify responses.

MVC 4 app users sometimes get logged off when creating new item in production

I have an MVC 4 app and am using the default authentication provider. I'm not using persistent cookies.
I don't have any problems in development but when hosted at HostGator, I SOMETIMES get logged off when I try to create a new item (HTTP POST). When this happens, I end up at the log on page like I wasn't authenticated.
HostGator does NOT have the app on multiple web servers so I'm thinking I shouldn't have to worry about machinekey stuff. Am I wrong?
When this happens, I just log in again and create the item again and it will succeed. Once this happens, I can't recreate the issue. I try reopening the browser and even different browsers but creating items will always work. It only seems to happen again if I try much later.
Some additional info, the timeout is set to 2880 (the default for an MVC project), which I know is long but I can't see how it would be related. Still, thought I'd mention it.
So I can't look at IIS logs or event viewer to get any idea what could be happening but I can add more logging to the app. Can anyone provide ideas for what to check or what logging to add to diagnose?
Thanks
EDIT
I realized that I could get to the IIS logs so I compared the POST that succeeded and the one that failed and immediately noticed something.
When I first did the GET to load the Item/Create page/view, the cs-username was populated but when I did the POST to create the item, it was gone. I can see that when I logged in again and was able to successfully create the item, that POST did have the cs-username populated.
Why would it disappear between the GET and the POST? There was a 7 minute delay from the GET to the POST but I can see I logged on 1 minute before the GET so the session was only 8 minutes old when the post happened. I've double checked that I don't have sessionstate explicitly configured so the default should be 20 minutes. I feel like I'm onto something but not sure exactly what.
Might be worth adding Glimpse, although running that on deployed code is kinda risky. It would have the benefit, though, of letting you see what's actually happening on the server. I've never used HostGator, so I can't say for certain, but if they recycle app pools aggressively, that would invalid your login, and explain why the logoff seems to happen randomly.

Devise + Heroku login sometimes fails, no error

About half the time when I push to Heroku, Devise stops letting me login for a seemingly random length of time. I can fix this either by waiting for more than 10 minutes (time varies) or sometimes by pushing again.
While this login issue is happening there is nothing in the logs to indicate anything is wrong and nothing in the flash when I get redirected back to the login form. I'm not sure what else to look for or what could be causing this. Because of the strange time limits I thought it might have something to do with the tmp folder being pushed but it's listed correctly in .gitignore.
What else should I check?
At the time you posted this, Heroku was having problems... I wonder if THAT was the problem?
see
https://status.heroku.com/
and scroll down the Oct 22.
FWIW for free you can add new relic basic version and setup a monitoring process that emails you when your app is having trouble.

Resources