[GH-ISSUE #117] DPS loading config.json multiple times to execute one single action #48

Closed
opened 2026-02-26 04:33:53 +03:00 by kerem · 2 comments
Owner

Originally created by @mageddo on GitHub (Apr 4, 2019).
Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/117

For some reason DPS logs say it is loading config.json multiple times to solve a unique DNS record.

What is expected
DPS load config.json the mininum of times as possible

What is happening

It seems DPS is loading config.json multiple times

Steps to reproduce

$ nslookup google.com

log.txt

019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json
2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=openingFile
2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=success
2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json
2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=openingFile
2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=success
2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json
2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=openingFile
2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=success
2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json
2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=openingFile
2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=success
2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json
2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=openingFile
2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=success
2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json
2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=openingFile
2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=success
2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json
2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=openingFile
2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=success
2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json
2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=openingFile
2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=success
2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json
2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=openingFile
2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=success
2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json
2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=openingFile
2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration  status=success```

Originally created by @mageddo on GitHub (Apr 4, 2019). Original GitHub issue: https://github.com/mageddo/dns-proxy-server/issues/117 For some reason DPS logs say it is loading config.json multiple times to solve a unique DNS record. **What is expected** DPS load config.json the mininum of times as possible **What is happening** It seems DPS is loading config.json multiple times **Steps to reproduce** ``` $ nslookup google.com ``` log.txt ```` 019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json 2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=openingFile 2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=success 2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json 2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=openingFile 2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=success 2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json 2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=openingFile 2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=success 2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json 2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=openingFile 2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=success 2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json 2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=openingFile 2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=success 2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json 2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=openingFile 2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=success 2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json 2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=openingFile 2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=success 2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json 2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=openingFile 2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=success 2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json 2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=openingFile 2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=success 2019/04/04 06:13:11 INFO f=local.go:34 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=begin, confPath=/app/conf/config.json 2019/04/04 06:13:11 INFO f=local.go:37 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=openingFile 2019/04/04 06:13:11 INFO f=local.go:65 pkg=github.com/mageddo/dns-proxy-server/events/local m=LoadConfiguration status=success```
kerem 2026-02-26 04:33:53 +03:00
  • closed this issue
  • added the
    feature
    label
Author
Owner

@mageddo commented on GitHub (Apr 6, 2019):

Dps is loading multiple times because it's really necessary, the point is the config.json have not a cache.

Develop a cache for the config file is necessary, this way we can reduce disk usage

<!-- gh-comment-id:480507602 --> @mageddo commented on GitHub (Apr 6, 2019): Dps is loading multiple times because it's really necessary, the point is the config.json have not a cache. Develop a cache for the config file is necessary, this way we can reduce disk usage
Author
Owner

@mageddo commented on GitHub (Mar 16, 2023):

Fixed #267

<!-- gh-comment-id:1471722182 --> @mageddo commented on GitHub (Mar 16, 2023): Fixed #267
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dns-proxy-server-mageddo#48
No description provided.