I am facing an issue with my Rails 5 app (running on AWS, Apache server) where one of our coworkers started experiencing freezing of browser (Google Chrome on Windows 10) when pressing a submit button at a form. When he presses the submit button, the browser freezes for 3 minutes and then reloads with new (updated) values in the form.
This started a few weeks ago and it happens only in Google Chrome (tried to upgrade it to its newest version, reinstall it, but it didn't help); in Mozilla or Internet Explorer it works on his laptop smoothly. This behavior appeared on 2 people's laptops in the company, the other 15 people are fine (mix of Macbooks and Windows laptops) - including me.
I connected to this person's laptop via TeamViewer and inspected the laptop's behavior. When the form's submit button is pressed, Google Chrome freezes (Not responding
), the CPU usage jumps from 10% to 70%. Then, after 3 minutes when Google Chrome "unblocks" itself, the CPU usage drops again to 10% and Google Chrome is possible to use again.
I thought that on the laptop might be running different processes, but that doesn't seem to be the case:
The model that gets updated has 30 associations (belongs_to
or has_many
) - not all of them get updated when the form is sent. There are 2 nested attributes. Also, on this model is used the paper_tail gem.
I am struggling to debug this issue as I've never faced it and also, we have 15 laptops with Win 10 and Google Chrome and only on 2 of them is this issue.
I'd be very grateful for any advice.
EDIT: I forgot to mention that after sending the form, the Rails app runs some Sidekiq jobs.
EDIT 2:
Ubuntu 14.04.5 LTS
Rails 5.1.3
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
Sidekiq v5.0.4
EDIT 3: On the machine are only Google Docs-related extensions and AdBlock. However, for debugging, I have removed them all to see if this is the issue - still the same. The problematic behavior is still there.
EDIT 4: The number of tabs doesn't matter. Even with only 1 opened tab is the issue here. Also tried to empty cache & cookies, as well as to restore Google Chrome to its default setting.
EDIT 5: After another run of debugging - server logs look normal (there's nothing special), front-end loading times as well. Then, I tried to use the app in Chrome's incognito tab - and it worked smoothly! Then, I tried to use Chrome in the guest's tab - and again, it worked smoothly as well! But if the app is running in a tab where a user is logged in (or even logged out - but NOT incognito/guest), then the app is freezing when the form is submitted. I am wondering what can be installed/added under the user profile except for extensions. I've tried to remove/disable all of these, but the app was still freezing:
I tried to reset Chrome to its default settings - didn't help. A colleague that is facing this issue said that he tried to reinstall Google Chrome, everything was working fine for a few weeks, but then the freezing started again.
EDIT 6: It looks that I finally found the reason why Chrome is freezing on certain laptops - it seems to be the capacity of the autofill feature that Chrome has. The limit here is 1,000 saved user data information per profile. When I checked the users data on the problematic laptops (through DB Browser for SQLite), I found that on both of them is this limit hit. When I tried to create a new Chrome profile or use Chrome in the incognito/guest mode, the freezing (and Not Responding status) is gone and everything works smoothly.
Now, because we need the autofill feature and it makes our life way easier - we're looking into Chrome extensions (that could ideally utilize the existing autofill data and allow us to save new ones - more than 1k). Or, potentially, looking after Firefox and its limit for autofill user data. Any ideas about how to extend the autofill user data limit in Chrome?