You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a crash when I try to make a test for high load.
I call ab -c 50 -n 10000 -f TLS1.2 -H "Accept-Encoding: gzip,deflate" http://127.0.0.1:8181/activities
in a command line and I have the crash in
PerfectMySQL->MySQLStmt.swift->line 218 let r = mysql_stmt_execute(ptr)
Crash is Thread 2: signal SIGABRT
I use Mac OS Majove,
Swift 4.2
PerfectMySQL 3.3.0
Maybe I wrong setup connect to a database?
part of my code:
//Connection to database
mySQL = MySQL()
let isConnected = mySQL.connect(host: testHost, user: testUser, password: testPassword, db: nil, port: testPort, socket: nil, flag: 0)
db = Database(configuration: MySQLDatabaseConfiguration(connection: mySQL))
//Code from handler
let result = try db.table(Activity.self).order(by: \Activity.updatedAt).limit(count, skip: from).select()
let activities: [[String: Any]] = result.map{
$0.toJson()
}
let responseString = JSON(activities).rawString() ?? "[]"
response.appendBody(string: responseString).completed(status: .ok)
So the code is very simple. just select items from the database.
The text was updated successfully, but these errors were encountered:
Hello,
I have a crash when I try to make a test for high load.
I call
ab -c 50 -n 10000 -f TLS1.2 -H "Accept-Encoding: gzip,deflate" http://127.0.0.1:8181/activities
in a command line and I have the crash in
PerfectMySQL->MySQLStmt.swift->line 218 let r = mysql_stmt_execute(ptr)
Crash is Thread 2: signal SIGABRT
I use Mac OS Majove,
Swift 4.2
PerfectMySQL 3.3.0
Maybe I wrong setup connect to a database?
part of my code:
So the code is very simple. just select items from the database.
The text was updated successfully, but these errors were encountered: