Mobabel Blog
Hibernate Oracle sessions not be closed correctly
We got escalation today, a lot of services are very slow or stop working. Our Oracle database(10g) admin has found that there are a huge number of unclosed sessions in the Oracle database. In...
Increase the building heap-size for Jenkins jobs
In Jenkins configuration the following configs have been set: Maven Project Configuration->Global MAVEN_OPTS
1 |
-Xmx8192m -XX:MaxPermSize=1024m |
Global properties->Environment variables
1 2 3 4 |
Name: MAVEN_OPTS Value: -Xmx8192m -XX:MaxPermSize=1024m -Djava.io.tmpdir=/clusters/shared_workspace/tmp |
Jenkins pipeline to create and trigger jobs dynamically inside a loop
There is a requirement from the customer, to build a pipeline, which will be executed to call 100 remote entry points. Of course, we have a classic approach to do this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
stage('aa_11'){ steps{ build job: 'Tasks/pipeline_to_call_remote_api', wait: true, parameters: [ string(name: 'PARAM1', value: 'aa'), string(name: 'PARAM2', value: '11') ] } } stage('aa_22'){ steps{ build job: 'Tasks/pipeline_to_call_remote_api', wait: true, parameters: [ string(name: 'PARAM1', value: 'aa'), string(name: 'PARAM2', value: '22') ] } } ....... |
Liveness and Readiness Probes with Spring Boot – for k8s
In Kubernetes, the Liveness and Readiness Kubernetes concepts represent facets of the application state. The Liveness state of an application tells whether the internal state is valid. If Liveness is broken, this means that the application...
How to do JVM performance analysis in docker container?
1. Prerequisite Java application with docker based on JDK 8 and alpine. This app is a Jhipster application. Dockerfile:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
FROM openjdk:8-jre-alpine ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \ JHIPSTER_SLEEP=0 \ JAVA_OPTS="" # Add a jhipster user to run our application so that it doesn't need to run as root RUN adduser -D -s /bin/sh jhipster WORKDIR /home/jhipster ADD entrypoint.sh entrypoint.sh RUN chmod 755 entrypoint.sh && chown jhipster:jhipster entrypoint.sh USER jhipster ENTRYPOINT ["./entrypoint.sh"] EXPOSE 18082 5701/udp ADD *.jar app.jar |
entrypoint.sh
1 2 3 4 |
#!/bin/sh echo "The application will start in ${JHIPSTER_SLEEP}s..." && sleep ${JHIPSTER_SLEEP} exec java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=5005,suspend=n -jar "${HOME}/app.jar" "$@" |
2. Precheck Enter container to check the process. Of course, we...
Hibernate second-level cache stops all database operation
The customer reported today that one of our services stopped working, the new coming data can not be saved into the database. After checking the logs, there are a lot of “Hazelcast instance is...
Memory/CPU limit in Docker Swarm
Running 1,000 Containers in Docker Swarm How to Limit Resources for Docker Swarm Services https://docs.docker.com/config/containers/resource_constraints/ What does –oom-kill-disable do for a Docker container? Unable to use oom-kill-disable configuration Docker Container Resource Management: CPU, RAM...
Getting data from docker MySQL database with Jenkins pipeline and send Email as attachment
In this post, a simple daily data report for one microservice will be created using the Jenkins pipeline. Prerequisites: Publish Over SSH Mattermost Notification Plugin Groovy Postbuild Jenkins
Use multiple JDKs in one Jenkinsfile
As usual, the Jenkins pipeline will only use the default JDK to execute the task. How to use multiple JDKs in one Jenkinsfile for different stages? First, define the multiple JDKs in Jenkins “Global...
Disable Logback log files in containers
We found the spring boot project running containers will keep restarting after some time, maybe 10 days, maybe 5 days. The root cause is spring logback is writing log files into /tmp/ directory as...