I have an app written on phalcon. The are some issues running it on the production It works fine on my local machine and development server. But every "insert" DB operation through the orm causes app freeze - no errors and the execution could not finish. "select" and "update" operations through the orm work absolutely fine. When making "insert" operation with raw query there is no problem.
DB connection :
$di->set('db', function()use ($config) {
return new PdoMysql(array(
"host" => $config->database->host,
"username" => $config->database->username,
"password" => $config->database->password,
"dbname" => $config->database->name,
'charset' =>'utf8'
));
});
// inserting a row in the db:
$user = new Users();
$user->username = '........'; $user->password = '......';
if (!$user->save()) {
$msg = "Error. ";
foreach ($user->getMessages() as $message) {
$msg .= " " . $message . ";";
}
$result = array(
"status" => $config["statuses"]["error"],
"error_number" => "10",
"message" => $msg
);
echo json_encode($result);
return;
}
The application freezes when it gets to the "save()". Before that everything works fine. No erros or response are returned.
The configuration on the production server is : OS: Linux Debian 3.16.7 PHP: 5.6.17 MySQL: 5.5.47 Phalcon: 2.0.9