# \[RESOLVED\] all data getting deleted (app authentication issue)

**URL:** <https://dragonfly.discourse.group/t/resolved-all-data-getting-deleted-app-authentication-issue/219>\
**Category:** General\
**Created:** [October 16, 2024, 9:37am UTC](https://dragonfly.discourse.group/t/resolved-all-data-getting-deleted-app-authentication-issue/219 "2024-10-16T09:37:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaip1003](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jaip1003](https://dragonfly.discourse.group/u/jaip1003)\
**Post date:** [October 16, 2024, 9:37am UTC](https://dragonfly.discourse.group/t/resolved-all-data-getting-deleted-app-authentication-issue/219/1 "2024-10-16T09:37:02Z")

</div>

Data is getting remove from dragonfly without throwing any error

---

<div class="post-metadata">

**Author:** ![joezhou\_df](https://yyz2.discourse-cdn.com/flex004/user_avatar/dragonfly.discourse.group/joezhou_df/32/82_2.png) [@joezhou\_df](https://dragonfly.discourse.group/u/joezhou_df)\
**Post date:** [October 16, 2024, 3:56pm UTC](https://dragonfly.discourse.group/t/resolved-all-data-getting-deleted-app-authentication-issue/219/2 "2024-10-16T15:56:05Z")

</div>

Hi there,

Thanks for bringing this up, and we’re sorry to hear you’re facing this issue. To help us better understand what’s going on, could you please provide a bit more detail?

Specifically:

- What’s your hardware/environment setup?
- Which version of Dragonfly are you running?
- Is there any chance that a client (e.g., a local CLI/SDK or any connected application) could have issued a command like `FLUSHALL`?

This does sound unusual, so we’d need more context to investigate further. If this is your production instance, feel free to join our [Discord server](https://discord.gg/HsPjXGVH85), and we may be able to connect you with an engineer for additional support. But we’ll definitely need more information to move forward.

---

<div class="post-metadata">

**Author:** ![joezhou\_df](https://yyz2.discourse-cdn.com/flex004/user_avatar/dragonfly.discourse.group/joezhou_df/32/82_2.png) [@joezhou\_df](https://dragonfly.discourse.group/u/joezhou_df)\
**Post date:** [October 16, 2024, 5:42pm UTC](https://dragonfly.discourse.group/t/resolved-all-data-getting-deleted-app-authentication-issue/219/3 "2024-10-16T17:42:10Z")

</div>

For example, hypothetically, if you are running Dragonfly on a public cloud on the default port without authentication, that could be very dangerous, and hackers can easily issue destructive commands.

Whatever the issue could be, if you still have the Dragonfly instance, **the output of the `INFO ALL` command** would be a good starting point for us to help with the situation.

---

<div class="post-metadata">

**Author:** ![jaip1003](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jaip1003](https://dragonfly.discourse.group/u/jaip1003)\
**Post date:** [October 17, 2024, 10:54am UTC](https://dragonfly.discourse.group/t/resolved-all-data-getting-deleted-app-authentication-issue/219/4 "2024-10-17T10:54:50Z")

</div>

> [@joezhou\_df](#):
>
> INFO ALL

# Server

redis\_version:6.2.11  
dragonfly\_version:df-v1.23.0  
redis\_mode:standalone  
arch\_bits:64  
os:Linux 6.1.0-18-amd64 x86\_64  
multiplexing\_api:iouring  
tcp\_port:6379  
thread\_count:96  
uptime\_in\_seconds:9253  
uptime\_in\_days:0

# Clients

connected\_clients:390  
max\_clients:64000  
client\_read\_buffer\_bytes:1973760  
blocked\_clients:0  
pipeline\_queue\_length:0

# Memory

used\_memory:59202160  
used\_memory\_human:56.46MiB  
used\_memory\_peak:432599144  
used\_memory\_peak\_human:412.56MiB  
fibers\_stack\_vms:32948512  
fibers\_count:1006  
used\_memory\_rss:468480000  
used\_memory\_rss\_human:446.78MiB  
used\_memory\_peak\_rss:1680318464  
maxmemory:42949672960  
maxmemory\_human:40.00GiB  
used\_memory\_lua:0  
object\_used\_memory:197552  
type\_used\_memory\_string:197552  
table\_used\_memory:54125568  
num\_buckets:92160  
num\_entries:96  
inline\_keys:4  
listpack\_blobs:0  
listpack\_bytes:0  
small\_string\_bytes:3952  
pipeline\_cache\_bytes:9450  
dispatch\_queue\_bytes:0  
dispatch\_queue\_subscriber\_bytes:0  
dispatch\_queue\_peak\_bytes:0  
client\_read\_buffer\_peak\_bytes:1973760  
tls\_bytes:5664  
snapshot\_serialization\_bytes:0  
cache\_mode:cache  
maxmemory\_policy:eviction

# Stats

total\_connections\_received:1266  
total\_commands\_processed:8261180  
instantaneous\_ops\_per\_sec:14  
total\_pipelined\_commands:1160139  
total\_pipelined\_squashed\_commands:898  
pipelined\_latency\_usec:308824163  
total\_net\_input\_bytes:8018413100  
connection\_migrations:0  
total\_net\_output\_bytes:11018755978  
rdb\_save\_usec:0  
rdb\_save\_count:0  
instantaneous\_input\_kbps:-1  
instantaneous\_output\_kbps:-1  
rejected\_connections:-1  
expired\_keys:87868  
evicted\_keys:0  
hard\_evictions:0  
garbage\_checked:0  
garbage\_collected:0  
bump\_ups:729123  
stash\_unloaded:0  
oom\_rejections:0  
traverse\_ttl\_sec:2933  
delete\_ttl\_sec:0  
keyspace\_hits:2038937  
keyspace\_misses:2189621  
keyspace\_mutations:4030441  
total\_reads\_processed:7858075  
total\_writes\_processed:7531026  
defrag\_attempt\_total:0  
defrag\_realloc\_total:0  
defrag\_task\_invocation\_total:0  
reply\_count:7531026  
reply\_latency\_usec:123327199  
blocked\_on\_interpreter:0  
lua\_interpreter\_cnt:0  
lua\_blocked:0

# Tiered

tiered\_entries:0  
tiered\_entries\_bytes:0  
tiered\_total\_stashes:0  
tiered\_total\_fetches:0  
tiered\_total\_cancels:0  
tiered\_total\_deletes:0  
tiered\_total\_uploads:0  
tiered\_total\_stash\_overflows:0  
tiered\_heap\_buf\_allocations:0  
tiered\_registered\_buf\_allocations:0  
tiered\_allocated\_bytes:0  
tiered\_capacity\_bytes:0  
tiered\_pending\_read\_cnt:0  
tiered\_pending\_stash\_cnt:0  
tiered\_small\_bins\_cnt:0  
tiered\_small\_bins\_entries\_cnt:0  
tiered\_small\_bins\_filling\_bytes:0  
tiered\_cold\_storage\_bytes:0  
tiered\_offloading\_steps:0  
tiered\_offloading\_stashes:0  
tiered\_ram\_hits:2038937  
tiered\_ram\_cool\_hits:0  
tiered\_ram\_misses:0

# Persistence

current\_snapshot\_perc:0  
current\_save\_keys\_processed:0  
current\_save\_keys\_total:0  
last\_success\_save:1729172879  
last\_saved\_file:  
last\_success\_save\_duration\_sec:0  
loading:0  
saving:0  
current\_save\_duration\_sec:0  
rdb\_changes\_since\_last\_success\_save:118  
last\_failed\_save:1729182116  
last\_error:Invalid argument: Couldn’t open file for writing (is direct I/O supported by the file system?)  
last\_failed\_save\_duration\_sec:0

# Transaction

tx\_shard\_polls:576  
tx\_shard\_optimistic\_total:8258999  
tx\_shard\_ooo\_total:0  
tx\_global\_total:6  
tx\_normal\_total:8258999  
tx\_inline\_runs\_total:84863  
tx\_schedule\_cancel\_total:0  
tx\_with\_freq:8258999,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6  
tx\_queue\_len:0  
eval\_io\_coordination\_total:0  
eval\_shardlocal\_coordination\_total:0  
eval\_squashed\_flushes:0  
multi\_squash\_execution\_total:80  
multi\_squash\_execution\_hop\_usec:542899  
multi\_squash\_execution\_reply\_usec:5023641

# Replication

role:master  
connected\_slaves:0  
master\_replid:d86ad84777578de8ec147ae35d4881e38655cbde

# Commandstats

cmdstat\_client:calls=2062,usec=41611,usec\_per\_call=20.1799  
cmdstat\_command:calls=2,usec=3651,usec\_per\_call=1825.5  
cmdstat\_config:calls=9,usec=430,usec\_per\_call=47.7778  
cmdstat\_del:calls=2192434,usec=180708453,usec\_per\_call=82.4237  
cmdstat\_flushall:calls=2,usec=98508,usec\_per\_call=49254  
cmdstat\_get:calls=4225036,usec=378292900,usec\_per\_call=89.536  
cmdstat\_info:calls=75,usec=1641861,usec\_per\_call=21891.5  
cmdstat\_save:calls=5,usec=21013,usec\_per\_call=4202.6  
cmdstat\_select:calls=25,usec=29202,usec\_per\_call=1168.08  
cmdstat\_set:calls=1450949,usec=137259015,usec\_per\_call=94.5995  
cmdstat\_zadd:calls=386912,usec=35689492,usec\_per\_call=92.2419  
cmdstat\_zrange:calls=146,usec=6575488,usec\_per\_call=45037.6  
cmdstat\_zrangebyscore:calls=3376,usec=504590,usec\_per\_call=149.464  
cmdstat\_zrem:calls=146,usec=227861,usec\_per\_call=1560.69

# Modules

module:name=ReJSON,ver=20000,api=1,filters=0,usedby=[search],using=,options=[handle-io-errors]  
module:name=search,ver=20000,api=1,filters=0,usedby=,using=[ReJSON],options=[handle-io-errors]

# Search

search\_memory:0  
search\_num\_indices:0  
search\_num\_entries:0

# Errorstats

DF snapshot format requires no filename extension. Got “.db”:1  
config\_error:5  
Invalid argument: Couldn’t open file for writing (is direct I/O supported by the file system?):4

# Keyspace

db0:keys=63,expires=36,avg\_ttl=-1  
db5:keys=33,expires=33,avg\_ttl=-1

# Cpu

used\_cpu\_sys:1312.634241  
used\_cpu\_user:1532.743540  
used\_cpu\_sys\_children:0.0  
used\_cpu\_user\_children:0.0  
used\_cpu\_sys\_main\_thread:12.602310  
used\_cpu\_user\_main\_thread:15.231120

# Cluster

cluster\_enabled:0

These all information of INFO ALL

Using below command to run  
**dragonfly --bind 0.0.0.0 --logtostderr --dir /dev/dragonflydump --dbfilename my-snapshot-file --maxmemory 40GB**

---

<div class="post-metadata">

**Author:** ![joezhou\_df](https://yyz2.discourse-cdn.com/flex004/user_avatar/dragonfly.discourse.group/joezhou_df/32/82_2.png) [@joezhou\_df](https://dragonfly.discourse.group/u/joezhou_df)\
**Post date:** [October 17, 2024, 2:49pm UTC](https://dragonfly.discourse.group/t/resolved-all-data-getting-deleted-app-authentication-issue/219/5 "2024-10-17T14:49:21Z")

</div>

> [@jaip1003](#):
>
> # Commandstats
> 
> cmdstat\_client:calls=2062,usec=41611,usec\_per\_call=20.1799  
> cmdstat\_command:calls=2,usec=3651,usec\_per\_call=1825.5  
> cmdstat\_config:calls=9,usec=430,usec\_per\_call=47.7778  
> cmdstat\_del:calls=2192434,usec=180708453,usec\_per\_call=82.4237  
> **cmdstat\_flushall:calls=2,usec=98508,usec\_per\_call=49254 \<\<\<\<\<\<\<\<\<\<**  
> cmdstat\_get:calls=4225036,usec=378292900,usec\_per\_call=89.536

From the `Commandstats` section, we can see that the `FLUSHALL` command was called twice.

Is there any possibility that an application service calls this command upon restart? (i.e., some example code snippets perform a flush to ensure a clean environment.)

---

<div class="post-metadata">

**Author:** ![jaip1003](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jaip1003](https://dragonfly.discourse.group/u/jaip1003)\
**Post date:** [October 20, 2024, 1:42pm UTC](https://dragonfly.discourse.group/t/resolved-all-data-getting-deleted-app-authentication-issue/219/6 "2024-10-20T13:42:36Z")

</div>

Thanks @joezhou_df. Now working, It was authentication issue only.

---

<div class="post-metadata">

**Author:** ![joezhou\_df](https://yyz2.discourse-cdn.com/flex004/user_avatar/dragonfly.discourse.group/joezhou_df/32/82_2.png) [@joezhou\_df](https://dragonfly.discourse.group/u/joezhou_df)\
**Post date:** [October 21, 2024, 1:01am UTC](https://dragonfly.discourse.group/t/resolved-all-data-getting-deleted-app-authentication-issue/219/7 "2024-10-21T01:01:59Z")

</div>

Glad we figured it out! Easy fix—and please double-check those settings to avoid it happening again.

I’ll go ahead and update the post title to reflect the solution. If you have any other questions or run into anything else, feel free to ask!

---

<div class="post-metadata">

**Author:** ![joezhou\_df](https://yyz2.discourse-cdn.com/flex004/user_avatar/dragonfly.discourse.group/joezhou_df/32/82_2.png) [@joezhou\_df](https://dragonfly.discourse.group/u/joezhou_df)\
**Post date:** [October 21, 2024, 3:35pm UTC](https://dragonfly.discourse.group/t/resolved-all-data-getting-deleted-app-authentication-issue/219/8 "2024-10-21T15:35:20Z")

</div>

As an additional side note, you may consider renaming/disabling some commands like `FLUSHALL` in your production instance using configs like `--rename_command` or `--restricted_commands`.

> **[Server Configuration Flags | Dragonfly](https://www.dragonflydb.io/docs/managing-dragonfly/flags#--rename_command)**
>
> Dragonfly can be tuned and configured by a set of config flags. These flags can be:
