I wrote a simple crawler using Simple HTML Dom Parser to scrape some stuff.
It's a simple script only running with 1 process and nothing massive. But after some time it produces a "Segmentation fault (core dumped)"-error,
when I am running it in the shell.
When I run the script in the browser it says
"Error: The connection to the server was reset while the page was loading.".
I have made sure to unset()
every variable as soon as possible and also increased the memory_limit
in php.ini
, but still I get this error :/
Does someone know what it means and how to solve it?
Thanks for any suggestions!
Core Dump/Segmentation fault is a specific kind of error caused by accessing memory that “does not belong to you.” When a piece of code tries to do read and write operation in a read only location in memory or freed block of memory, it is known as core dump. It is an error indicating memory corruption.
A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core . Segfaults are caused by a program trying to read or write an illegal memory location.
A SIGSEGV signal or segmentation error occurs when a process attempts to use a memory address that was not assigned to it by the MMU.
I have this problem when a made a recursive loop by accident, so it runs out of memory. But the way it tells me is by making a Segmentation fault (core dumped)
error!
So look a the code you most recently wrote and check if you made a error like this! My example was very simple (and stupid). I was just a little to fast to accept the autocomplete's suggestion :)
public function getAttendees()
{
return $this->getAttendees();
}
Hope this can help someone in the future
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With