monolog catch Fatal Error: Allowed memory size exhausted - exception

I would like to know how I can make monolog for symfony 4 logging fatal errors:
PHP Fatal error: Allowed memory size of xxxx exhausted
to the main log handler.
In my application these errors are logged in the PHP error_log file.

You can catch fatal error in PHP7, with Throwable exception. https://www.php.net/manual/en/class.throwable.php
This answer can help you https://stackoverflow.com/a/44280053/4939326.

Related

Firebase functions logging with winston papertrail gives ECONNRESET error

When developing node-js app's I enjoy using winston logging in combination with papertrail (a logging SaaS provider).
I can get the logging from firebase-functions working with papertrail, however, my problem is that when the functions instance is closing down, winston-papertrail throws an error:
Papertrail connection error: { Error: read ECONNRESET
at exports._errnoException (util.js:1020:11)
at TLSWrap.onread (net.js:580:26) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
I try to close down the winston-papertrail with code like this, at the end of my functions:
logger.close();
However the errors arrive in the firebase console like this:
I would love to know if anyone has a working setup with no errors, or could maybe point me in the right direction.

IJK MediaCodec Buffer (J4A) not loading

while using ijkmediaplayer, necessary packages from the J4A loader is not loading (like MediacodecInfo, MediaCodecBufferInfo, java.nio.ByteBuffer, Buffer) That's why I am getting an error of insufficient resources to instantiate the decoder.
02-21 14:23:59.335 2719-16555/? E/OMX-VDEC-1080P: Failed to call stream on OUTPUT due to HW_OVERLOAD
02-21 14:23:59.335 2719-16555/? E/OMX-VDEC-1080P: empty_this_buffer_proxy failure due to HW overload
02-21 14:23:59.337 2719-16555/? E/OMX-VDEC-1080P: ERROR: Sending OMX_ErrorInsufficientResources to Client
02-21 14:23:59.341 2719-16555/? E/OMX-VDEC-1080P: Failed to qbuf to driver
02-21 14:23:59.343 2719-16555/? E/OMX-VDEC-1080P: Failed to qbuf to driver
Can anyone please tell me why J4A buffer modules are not getting loaded or called?
How to resolve this issue?

Error Message not generated

1 - Build flex on Windows 7 64 bits, and when error is thrown, i can get both the error code and error Message
2015/06/15 16:47:26:192 [ERROR] MyClass Error: Error #3013: File or directory is in use.
at flash.filesystem::FileStream/open()
at MyClass/openCsv()
...
2 - Build flex on Windows 2008 R2 64 Bits, and when error is thrown, i can get only the error code, but not the error message
2015/06/15 17:15:17:215 [ERROR] MyClass Error: Error #3013
at MyClass/openCsv()
...
Thanks for your help :)
This issue was not due to the operating system
The response is : We can get the error message only in debug mode, but not in production mode
Also, you can take a look to the previous answers:
Get Full Exception Error with Flex

MySQL fatal error during information_schema query (software caused connection abort)

I'm using MySQL server (5.6) database extensively through its .NET connector (6.8.3). All tables are created with MyISAM engine for performance reasons. I have only one process with one thread accessing the DB sequentially, so there is no need for transactions and concurrency.
Please note: this is unlikely to be a timeout configuration issue, because my query is trivial. I did read all timeout related questions (links below). Of course, I may be wrong, but saying just "increase the net_write_timeout parameter" without explaining why exactly it can be relevant here is not an answer.
Some of my tables are created dynamically during program execution so I'm using create on first use idiom, with the following method to check whether the table exists:
private bool TableExists(Space baseSpace, Space extendedSpace)
{
var tableName = GenerateTableName(baseSpace, extendedSpace);
var sqlConnection = this.connectionPool.Take();
this.existsCommand.Connection = sqlConnection;
this.existsCommand.Parameters["#tableName"].Value = tableName.Trim('`');
var result = existsCommand.ExecuteScalar() as long?;
this.connectionPool.Putback(sqlConnection);
return result == 1;
}
The query inside the existsCommand is as follows (broken into two lines here for readability):
SELECT COUNT(*) FROM information_schema.tables
WHERE table_schema = 'my_schema' AND table_name = #tableName
The value of this.existsCommand.Parameters["#tableName"].Value variable contains the correct name of the table, that already exists in this case ("sample_matches_A_to_A_x").
The this.connectionPool.Take() method returns the first MySqlConnection object from my collection of available connections that meets the following predicate:
private bool IsAvailable(MySqlConnection connection)
{
return connection != null
&& connection.State == System.Data.ConnectionState.Open;
}
Usually this works correctly, for a number of hours and then suddenly an exception occurs on this line:
var result = existsCommand.ExecuteScalar() as long?;
With the following contents:
Fatal error encountered during command execution
Stack trace:
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar()
at implementation.SampleMatchesMySqlTable.TableExists(Space baseSpace, Space extendedSpace) in C:...\SampleMatchesMySqlTable.cs:line 168
Inner exception:
Unable to write data to the transport connection: Software caused connection abort.
Inner exception:
Software caused connection abort.
with ErrorCode equal to 10053 and SocketErrorCode being System.Net.Sockets.SocketError.ConnectionAborted
Stack trace of the innermost exception:
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
I've reviewed the following possible duplicates and unfortunately they don't seem relevant here, except one:
SHOW TABLES encountered Fatal error encountered during command execution
Unfortunately, it doesn't provide enough information to decide whether it is an exact duplicate nor it's answered.
There relate to timeout problems. My query is small, returns only one integer, and searches for a table in a meta-table containing something like 20 other tables.
Fatal error encountered during command execution. in C# when i use Insert Into
https://stackoverflow.com/questions/7895178/fatal-error-in-mysql
MySQL Exception - Fatal Error Encountered During Data Read
Fatal error encountered during data read
Fatal error causing timeout -mysql
ADO.Net Entity framework, Fatal error encountered during data read
Different error regarding reading the resultset:
Fatal error encountered during command execution
Syntax errors and connection string issues:
Mysql Fatal error encountered during command execution
fatal error encountered during execution... during update
Fatal error encountered during command execution
fatal error encountered during command execution during update
fatal error encountered during command execution c# mysql
Fatal error encountered during command execution with a mySQL INSERT
I have Fatal error encountered during command execution
MySql exception was unhandled - Fatal error encountered during command execution
https://stackoverflow.com/questions/24098561/mysql-fatal-error-encountered-during-command-execution-in-c-sharp
Fatal Error Encounter During Command Execution MySQL VB
"Fatal error encountered during command execution." mysql-connector .net
"Fatal error encountered during command execution."
C#, MySQL - fatal error encountered during command execution- Checked other solutions, something I am Missing
Creating a view:
"fatal error encountered during command execution" when trying to add a view from MySQL DB
Reading CSV files:
Fatal error encountered during command execution while importing from csv to mysql
MySQL fatal error encountered during command execution - looping through all csv files in folder for load data local infile
I ended up modifying the IsAvailable method as follows:
private bool IsAvailable(MySqlConnection connection)
{
var result = false;
try
{
if (connection != null)
{
result = connection.Ping();
}
}
catch (Exception e)
{
Console.WriteLine("Ping exception: " + e.Message);
}
return result && connection.State == System.Data.ConnectionState.Open;
}
The .Ping call seems to be better in verifying connection's state then its properties, although it's very poorly documented. From some other sources I've read in the meantime:
an alternative is to run a simple query like SELECT 1 FROM DUAL instead of calling Ping.
Also, there seems that sometimes a DataReader, even though it was disposed (everything is implemented with the using statement), is still attached to the connection for some brief period of time. Because of this I've modified the condition to this:
if (connection != null && connection.State == ConnectionState.Open)
The State property has the Executing value as long as a DataReader is attached to it, so additionally verifying if it's Open at the beginning works fine here.

Error log for Octave "panic: Illegal instruction -- stopping myself"

Is there an error log where I can figure out the error message and line of code in my file which makes the Octave interpreter post the following messages in Emacs?
panic: Illegal instruction -- stopping myself...
panic: attempted clean up apparently failed -- aborting...
Process Inferior Octave aborted (core dumped)
You must use the Octave debugger (take a look at the Debugging section of the Octave manual).
If this was an error message, you could activate debug_on_error. Since it is not, it's a proper crash, you must start on debug mode (enter the keyboard command) and step line by line (enter the command dbstep) until you find which one causes the issue.