Replies: 1 comment
-
Most likely you are a blocking the event loop, make sure controllers that use the database are annotated with micronaut:
server:
thread-selection: IO |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thanks for reporting an issue, please review the task list below before submitting the
issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.
NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (https://stackoverflow.com/tags/micronaut) or Gitter (https://gitter.im/micronautfw/). DO NOT use the issue tracker to ask questions.
Task List
How does the local development environment often time out when using HTTP client requests, and also uses JPA to request the database, which is about 200ms. The same thing is requested under 100ms each time in spring cloud. Is there a problem with my configuration?
gateway properties:
micronaut:
server:
port: 8080
application:
name: ishGateway
caches:
discovery-client:
enabled: true
security:
enabled: true
token:
jwt:
enabled: true
generator:
access-token:
eureka:
client:
registration:
enabled: true
defaultZone: "${EUREKA_HOST:localhost}:${EUREKA_PORT:7890}"
tracing:
zipkin:
http:
url: http://localhost:9411
enabled: true
sampler: 1
other properties :
micronaut:
application:
name: ishGoodsService
server:
port: 8081
caches:
discovery-client:
enabled: true
datasources:
default:
url: jdbc:mysql://localhost:3306/db_ish?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
driverClassName: com.mysql.cj.jdbc.Driver
username: root
password: 123456
schema-generate: none
dialect: org.hibernate.dialect.MySQL8Dialect
maximum-pool-size: 100
jpa:
default:
entity-scan:
packages: com.ish.goods
jackson:
serialization-inclusion: always
serialization:
indentOutput: true
writeDatesAsTimestamps: false
eureka:
client:
registration:
enabled: true
defaultZone: "${EUREKA_HOST:localhost}:${EUREKA_PORT:7890}"
tracing:
zipkin:
enabled: true
http:
url: http://localhost:9411
hystrix:
stream:
enabled: true
Beta Was this translation helpful? Give feedback.
All reactions