Categories
Database Development

Index Maintenance on Clustered PK Index

I know there are similar question to this one, but I couldn’t find one dealing with Index Maintenance… I have some PK Clustered Indexes [int (auto increment).] I always notice that these Indexes frequently have two issues: Fragmentation is quickly over 10% Fragmentation is sometimes over 90% Do I need to apply the same logic […]

Categories
Android User Help

Unknown phone number

An app that I need is not recognizing a SIM/Phone number. …But the problem is not the app: Before we go: I’ve visitted other forums, but the answers are uneffective, completely unfit, or oriented to old androids. If I go to Settings > About phone > Status > SIM Status, I get many Unknowns; If […]

Categories
Database Development

Even with 90000 NOFILE mongo crashes with Too many open files in system

we suddenly got MongoDB servers crashing on docker container mongo:4.4 with this error: couldn’t open [/proc/1/stat] Too many open files in system","file":"src/mongo/util/processinfo_linux.cpp","line":78} you can see the full log here: [36mdb_1 |[0m {"t":{"$date":"2020-12-01T12:47:43.080+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn60","msg":"Slow query","attr":{"type":"command","ns":"myDB.user","command":{"aggregate":"user","pipeline":[{"$match":{"__t":"user"}},{"$unwind":{"path":"$security.tokens.learner","preserveNullAndEmptyArrays":true}},{"$unwind":{"path":"$security.tokens.cp","preserveNullAndEmptyArrays":true}},{"$unwind":{"path":"$security.tokens.admin","preserveNullAndEmptyArrays":true}},{"$match":{"$or":[{"$or":[{"$and":[{"trash.status":false},{"$or":[{"learner.lock.status":false},{"learner.lock.status":{"$exists":false}}]},{"learner.suspend.status":false},{"security.tokens.learner.token":"asdjasdjkasdasdbashd"},{"security.tokens.learner.expireDate":{"$gte":{"$date":"2020-12-01T12:47:42.977Z"}}},{"shared.roles.learner":true}]},{"$and":[{"security.tokens.learner.token":"asdjasdjkasdasdbashd"},{"security.tokens.learner.expireDate":{"$gte":{"$date":"2020-12-01T12:47:42.977Z"}}},{"$or":[{"learner.lock.status":false},{"learner.lock.status":{"$exists":false}}]},{"learner.suspend.status":false},{"$or":[{"facebook.registered":true},{"google.registered":true},{"linkedin.registered":true}]}]}]},{"$and":[{"trash.status":false},{"$or":[{"cp.lock.status":false},{"cp.lock.status":{"$exists":false}}]},{"cp.suspend.status":false},{"security.tokens.cp.token":"asdjasdjkasdasdbashd"},{"security.tokens.cp.expireDate":{"$gte":{"$date":"2020-12-01T12:47:42.977Z"}}},{"shared.roles.cp":true}]},{"$and":[{"trash.status":false},{"$or":[{"admin.lock.status":false},{"admin.lock.status":{"$exists":false}}]},{"admin.suspend.status":false},{"security.tokens.admin.token":"asdjasdjkasdasdbashd"},{"security.tokens.admin.expireDate":{"$gte":{"$date":"2020-12-01T12:47:42.977Z"}}},{"shared.roles.admin":true}]}]}}],"cursor":{},"$db":"myDB"},"planSummary":"COLLSCAN","keysExamined":0,"docsExamined":1569,"cursorExhausted":true,"numYields":2,"nreturned":1,"queryHash":"167A82D6","planCacheKey":"C324EA6F","reslen":4753,"locks":{"ReplicationStateTransition":{"acquireCount":{"w":5}},"Global":{"acquireCount":{"r":5}},"Database":{"acquireCount":{"r":5}},"Collection":{"acquireCount":{"r":5}},"Mutex":{"acquireCount":{"r":3}}},"storage":{},"protocol":"op_msg","durationMillis":101}} [36mdb_1 |[0m {"t":{"$date":"2020-12-01T12:58:25.000+00:00"},"s":"E", "c":"-", "id":23077, "ctx":"ftdc","msg":"Assertion","attr":{"error":"Location13538: couldn’t open [/proc/1/stat] Too many open files in system","file":"src/mongo/util/processinfo_linux.cpp","line":78}} [36mdb_1 |[0m {"t":{"$date":"2020-12-01T12:58:25.339+00:00"},"s":"E", "c":"STORAGE", […]

Categories
Database Development

Query Performance Help – HIGH CPU (100%)

thanks in advance for your time and consideration. One of my server is having a harding time, CPU is on 100% because of following query: SELECT DISTINCT t0.fieldn…, t1.fieldn…, t2.fieldn…, t3.fieldn…, t4.fieldn… FROM public.t0 t0 INNER JOIN public.t1 t1 ON t0.id2 = t1.id INNER JOIN public.t2 t2 ON t1.id = t2.id INNER JOIN public.t3 t3 […]

Categories
Database Development

SQL select question with group by and order

so I struggle with this rather simple task in SQLite. I have this table with columns hostname,kb,state so each row is a KB installed/notinstalled on a server (according to WSUS). Each server has few hundred rows there depending on it’s age and OS version. I want to simply see the latest (highest kb number) for […]

Categories
Database Development

MySQL query – Passing variable into subquery’s derived table

Is there a way to pass a variable into a subquery, and use that variable in a derived table in the subquery? I am trying identify "active" organizations, and there are multiple actions that constitute "activity". One is creating an invoice, represented here (others not shown here for the sake of readability). However, because there […]

Categories
Database Development

How to get disk statistics in the Postgres’ Cloud SQL?

We are having performance issues in our database probably connected to the disk performance (maximum read MB/s). Therefore, I want to see some statistics of the disks. However, there is no such statistic:

Categories
CMS Mastering Development

What are the yaml files in config/project? Should I commit them?

See the title. I’m currently committing the YAML files to our git repo so they deploy to our production server. Is that appropriate? Should I ignore the config/project folder?

Categories
Android User Help

Which of the two Remote Desktop Android apps from Microsoft is the correct one?

It seems there is some confusion in the Android store of which RDP (Remote Desktop) app microsoft is maintaining. It seems that they are maintaining two versions. Documentation on their site is inconsistent. There is Remote Desktop 8 App Name: com.microsoft.rdc.android Total Downloads: 10M+ Last Updated: October 12, 2020 And Remote Desktop App Name: com.microsoft.rdc.androidx […]

Categories
Database Development

How to get disk statistics in the Postgres’ Cloud SQL?

We are having performance issues in our database probably connected to the disk performance (maximum read MB/s). Therefore, I want to see some statistics of the disks. However, there is no such statistic: