add Gor (go-based HTTP replay tool) to content-store app, to replay a…#11
Open
Havoooo wants to merge 2 commits into
Open
add Gor (go-based HTTP replay tool) to content-store app, to replay a…#11Havoooo wants to merge 2 commits into
Havoooo wants to merge 2 commits into
Conversation
…ll requests to content-store-on-postgresql
Havoooo
pushed a commit
that referenced
this pull request
Jul 20, 2023
This commit sets `shm_size: 512mb` so that browser based tests run correctly (e.g. Jasmine unit tests and Capybara feature specs).
Docker allocates 64mb shared memory to containers by default, but recent versions of Chrome require more than this. Otherwise you'll start to see error messages complaining about an "invalid session id". In a previous discussion on Slack, it was informally agreed that 512mb seems to be the 'right sized' amount to allocate – but this was anecdotal, so other values may work equally well for our needs.
If the `shm_size` is too small, you'll get error messages that look something like this in your terminal:
```
NoSuchSessionError: invalid session id
at Object.throwDecodedError (/govuk/whitehall/node_modules/selenium-webdriver/lib/error.js:522:15)
at parseHttpResponse (/govuk/whitehall/node_modules/selenium-webdriver/lib/http.js:548:13)
at Executor.execute (/govuk/whitehall/node_modules/selenium-webdriver/lib/http.js:474:28)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async thenableWebDriverProxy.execute (/govuk/whitehall/node_modules/selenium-webdriver/lib/webdriver.js:735:17)
at async Object.runSpecs (/govuk/whitehall/node_modules/jasmine-browser-runner/index.js:116:9)
at async Command.runSpecs (/govuk/whitehall/node_modules/jasmine-browser-runner/lib/command.js:187:5) {
remoteStacktrace: '#0 0xaaaabaf6b1b0 <unknown>\n' +
'#1 0xaaaabada13b0 <unknown>\n' +
'#2 0xaaaabadc7fe4 <unknown>\n' +
'#3 0xaaaabadc9864 <unknown>\n' +
'#4 0xaaaabafa75f8 <unknown>\n' +
'#5 0xaaaabafa9d98 <unknown>\n' +
'#6 0xaaaabafa9acc <unknown>\n' +
'#7 0xaaaabaf987e0 <unknown>\n' +
'#8 0xaaaabafaa500 <unknown>\n' +
'#9 0xaaaabaf8e080 <unknown>\n' +
'#10 0xaaaabafc1790 <unknown>\n' +
'#11 0xaaaabafc1950 <unknown>\n' +
'#12 0xaaaabafdbbd4 <unknown>\n' +
'#13 0xffffb0f28628 <unknown>\n' +
'#14 0xffffb075501c <unknown>\n'
}
error Command failed with exit code 1.
```
This config needs to be applied to each service that needs to run Chrome. In this commit, I've added it to applications owned by the Publishing service. Other applications (including frontend applications) may also benefit from this config, but I didn't want to make assumptions about which applications need it and which don't.
More information about this problem is covered in this blog post:
https://thecurve.io/dealing-with-cryptic-seleniumwebdrivererrorinvalidsessioniderror-errors/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ll requests to content-store-on-postgresql