Error insert query over Grails on docker
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
### Expected Behavior
The application is in grails 4 version and works on a docker with this docker file
```
FROM adoptopenjdk/openjdk12-openj9
RUN apt full-upgrade
ENV JAVA_TOOL_OPTIONS -agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=n
COPY app.jar app.jar
COPY local_environment/local_config local_config
ENTRYPOINT ["java","-Xmx8192m","-Xms2048m","-XX:-TieredCompilation","-XX:+UseG1GC","-XX:+UseCGroupMemoryLimitForHeap","-XX:+UseStringDeduplication","- XX:+IdleTuningGcOnIdle","-Xtune:virtualized","-Xscmx128m","-Xscmaxaot100m","-XX:+UseContainerSupport","-Djava.security.egd=file:/dev/./urandom"," -DConfigLocation=/xxxx_config","-jar","/app.jar"]
EXPOSE 8000
```
When I have migrated the application to version 5 it should continue to work
### Actual Behaviour
The problem comes because when a query with many inserts is made from
```
def db = new Sql(dataSource)
db.executeInsert(sqlScript)
```
docker stops working with grails version 5 and groovy 3.0.7
However, if the JAR is launched java -jar app.jar inside a docker from ubuntu image for instance, there will be not problem when a query is made.
### Steps To Reproduce
Inside App with many inserts
def db = new Sql(dataSource)
b.executeInsert(sqlScript)
Errror
Lanch app.jar as a docker FROM adoptopenjdk/openjdk12-openj9
OK
Launch app.jar inside docker with linux image
### Environment Information
DOCKER
EKS
JDK 11
grailsVersion=5.1.7
grailsGradlePluginVersion=5.1.3
groovyVersion=3.0.7
gorm.version=7.2.1
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M
### Example Application
_No response_
### Version
5
Contributor guide
Research direction
Start with the reported db.executeInsert(sqlScript) path in the Grails 5 application and reproduce the many-insert query in the adoptopenjdk/openjdk12-openj9 Docker image. Compare it with launching the same app in an Ubuntu-based image; done means the application continues running when the insert query is executed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, groovy, java
- Domain
- backend, databases, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100