websocket.debug.yaml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. environment: debug
  2. auth:
  3. server_auth_secret: "992443c835c347d6a8b7d046d0261671"
  4. logger:
  5. filename: "/var/log/sikey/servers.log" # 日志文件路径
  6. max_size: 500 # 每个日志文件的最大大小(以MB为单位)
  7. max_backups: 3 # 保留的旧日志文件的最大数量
  8. max_age: 28 # 最多保留的天数
  9. compress: true # 是否压缩旧日志文件
  10. websocket:
  11. connect_size: 1024 # 控制消息 Channel 大小
  12. heartbeat_wait: 120 # 心跳超时
  13. message_size: 256 # 消息 channel 大小
  14. read_buffer_size: 1024 # 读消息体最大的 buffer size
  15. read_wait: 20 # 读超时
  16. write_buffer_size: 1024 # 写消息体最大的 buffer size
  17. write_wait: 10 # 写超时
  18. nats_url: "nats://106.75.230.4:4333"
  19. # mysql connection config
  20. mysql:
  21. dsn: "root:9RKdJsEQKnjrni9R@tcp(10.23.148.10:3306)/sikey?charset=utf8mb4&parseTime=true&loc=Local"
  22. ignore_record_not_found_error: true # Ignore ErrRecordNotFound error for logger
  23. max_idle_conns: 1000 # 设置空闲连接池中连接的最大数量
  24. skip_default_transaction: true # Ignore ErrRecordNotFound error for logger
  25. slow_threshold: 600 # Slow SQL threshold
  26. # 设置连接的有效时长 当 <= 0 时,连接永久保存,默认值时 0 。如果设置了 maxLifetime 会开启连接自动清理,
  27. # 清理的代码在 connectionCleaner 中, 它开启一个定时器,定时检查空闲连接池中的连接,超期的关闭连接。
  28. max_lifetime: -1
  29. max_open_conns: 100 # 设置打开数据库连接的最大数量。
  30. ssh: true
  31. user: "root"
  32. password: "RHTUH2z49aEXnsgz"
  33. hostname: "106.75.230.4:22"
  34. # redis connection config
  35. redis:
  36. addr: "106.75.230.4:6379"
  37. # REDIS_CHANNEL: 'message'
  38. connect_key: "connects"
  39. db: 0
  40. password: "sikey!Q@W#E456"
  41. # nats connection config
  42. nats:
  43. addr: "nats://106.75.230.4:4222"
  44. subject: "clients.message" # 消息通道