Hi,

I was trying to install a new module and got the following error message:
"The website encountered an unexpected error. Please try again later."

I was completely unable to access the site again and forced to restore to a previous back-up.

I tried again and this time it happened again when trying to re-install some Features module dependency modules, which I had previously installed successfully. E.g. Config override, at which point I got the same error message again.

This has happened to me several times in the last couple of months.

  • Is this a Drupal problem or a site hosting (GoDaddy) problem?
  • How can I solve it?

Kr,
Chris

Comments

hiramanpatil’s picture

If Drush is installed on server, you can see the errors in watchdog (drupal table).

Go to root directory of your project in command line and execute the command - drush watchdog-show. This command will list the recent errors from the log.

Find more Drush commands here:-
https://drushcommands.com/drush-7x/watchdog/watchdog-show/

Thanks

Pahkis’s picture

Hi again :),

Unfortunately I do not have DRUSH installed, nor a CLI or Drupal Composer to help download modules with third party plugins and libraries.
I have been site building with the GoDaddy host, via which, I set up the initial site using their Installatron application. It seems that DRUSH and a CLI did not come as part of the core package.
I did ask GoDaddy for help on how to install these, but there instructions for installing them on Go Daddy seemed to be circular in that they required command line instructions to install them in the first place.

Though I am willing to learn, I am not a coder or techie of any kind, so this level of fiddling under the hood is already a challenge for me. Buying into training courses is also not an option - so I learn by doing / trial and error using any open source guides and documentation I can find and understand. Drupal seems to be the only system that has the potential to do what I want it to, so Its a pity that Drupal does not appear to have matured beyond the 'Toys for the Boys' stage yet as so many of its lesser competitors appear to have been doing :(

In the mean time, I will go and check what system log reports I do have via the administration UI.

Kr,
Chris

Pahkis’s picture

Hi,
I checked the error log via the GoDaddy file manager and found some log examples (see below) that seem to recur often around the time of each D8 instance crash. The allowed memory size seems to be a regular issue, though whether that causes an instance to crash or not I do not know, nor how to fix it unless it is an SLA issue with GoDaddy.

Kr,
Chris

1. [09-May-2017 00:15:12 Europe/Helsinki] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 13061935 bytes) in /home/liikanjitsu/public_html/lol-liikan/modules/browscap/src/BrowscapImporter.php on line 277
2. [08-May-2017 22:55:57 Europe/Helsinki] Uncaught PHP Exception Drupal\Core\Database\SchemaObjectExistsException: "Table draggableviews_structure already exists." at /home/liikanjitsu/public_html/lol-liikan/core/lib/Drupal/Core/Database/Schema.php line 594
3. [08-May-2017 19:56:10 UTC] PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0

• [08-May-2017 10:55:03 Europe/Helsinki] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 13061935 bytes) in /home/liikanjitsu/public_html/lol-liikan/vendor/guzzlehttp/psr7/src/Stream.php on line 94
• [08-May-2017 17:50:32 Europe/Helsinki] Recoverable fatal error: Argument 2 passed to watchdog_exception() must be an instance of Exception, string given, called in /home/liikanjitsu/public_html/lol-liikan/modules/browscap/src/BrowscapEndpoint.php on line 61 and defined in /home/liikanjitsu/public_html/lol-liikan/core/includes/bootstrap.inc on line 375 #0 /home/liikanjitsu/public_html/lol-liikan/core/includes/bootstrap.inc(548): _drupal_error_handler_real(4096, 'Argument 2 pass...', '/home/liikanjit...', 375, Array)
• #1 /home/liikanjitsu/public_html/lol-liikan/core/includes/bootstrap.inc(375): _drupal_error_handler(4096, 'Argument 2 pass...', '/home/liikanjit...', 375, Array)
• #2 /home/liikanjitsu/public_html/lol-liikan/modules/browscap/src/BrowscapEndpoint.php(61): watchdog_exception('browscap', 'Server error: `...')
• #3 /home/liikanjitsu/public_html/lol-liikan/modules/browscap/src/BrowscapImporter.php(98): Drupal\browscap\BrowscapEndpoint->getBrowscapData(true)
• #4 /home/liikanjitsu/public_html/lol-liikan/modules/browscap/browscap.module(39): Drupal\browscap\BrowscapImporter->import(Object(Drupal\browscap\BrowscapEndpoint))

[:db_condition_placeholder_0] =>
)
" at /home/liikanjitsu/public_html/lol-liikan/core/modules/views/src/Plugin/views/query/Sql.php line 1488
[08-May-2017 06:09:14 Europe/Helsinki] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 13061935 bytes) in /home/liikanjitsu/public_html/lol-liikan/modules/browscap/src/BrowscapImporter.php on line 277
[08-May-2017 08:52:07 Europe/Helsinki] Uncaught PHP Exception Drupal\Core\Database\DatabaseExceptionWrapper: "Exception in Recent content[content_recent]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'node_field_data._deleted' in 'where clause': SELECT node_field_data.changed AS node_field_data_changed, node_field_data.nid AS nid, users_field_data_node_field_data.uid AS users_field_data_node_field_data_uid
FROM
{node_field_data} node_field_data
INNER JOIN {users_field_data} users_field_data_node_field_data ON node_field_data.uid = users_field_data_node_field_data.uid
WHERE (( (node_field_data.status = 1 OR (node_field_data.uid = 0 AND 0 <> 0 AND 0 = 1) OR 0 = 1) AND (node_field_data._deleted = :db_condition_placeholder_0) ))
ORDER BY node_field_data_changed DESC
LIMIT 5 OFFSET 0; Array
(

Anonymous’s picture

i think you faced memory size problem. you can increase in server php.ini file and start process again.

OR

you can see error from watchdog using drush

Pahkis’s picture

Hi,

Yes, absolutely right you are! :)

Spoke to hosting service and they have doubled the memory allowance - so hopefully that will solve the main issue without having to upgrade to a more expensive service ;-)

Thanks for your help/reply :)

Kr,
Chris

Pahkis’s picture

Memory it seems is not the only problem!

I enabled two or three Workspace related D8 modules, one at a time and unpdated the script between each - so far so good. I even deleted the cache for good measure. Then, when I tried to enable another module I got the following browser message:
"Thewebsite encountered an unexpected error. Please try again later."

Could this be a registry_rebuild issue?

Kr,
Chris

[10-May-2017 12:36:02 Europe/Helsinki] PHP Fatal error: Call to a member function get() on null in /home/liikanjitsu/public_html/lol-liikan/modules/devel/webprofiler/src/DataCollector/DatabaseDataCollector.php on line 47

[10-May-2017 09:51:56 UTC] PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
[10-May-2017 13:03:06 Europe/Helsinki] Uncaught PHP Exception Exception: "The configuration directory type 'override' does not exist" at /home/liikanjitsu/public_html/lol-liikan/core/includes/bootstrap.inc line 163
[10-May-2017 13:03:06 Europe/Helsinki] Failed to log error: Exception: The configuration directory type 'override' does not exist in config_get_config_directory() (line 163 of /home/liikanjitsu/public_html/lol-liikan/core/includes/bootstrap.inc). #0 /home/liikanjitsu/public_html/lol-liikan/modules/config_override/src/SiteConfigOverrides.php(65): config_get_config_directory('override')
#1 /home/liikanjitsu/public_html/lol-liikan/modules/config_override/src/SiteConfigOverrides.php(52): Drupal\config_override\SiteConfigOverrides->getSiteConfigOverrideFolder()
#2 /home/liikanjitsu/public_html/lol-liikan/core/lib/Drupal/Core/Config/ConfigFactory.php(209): Drupal\config_override\SiteConfigOverrides->loadOverrides(Array)
#3 /home/liikanjitsu/public_html/lol-liikan/core/lib/Drupal/Core/Config/ConfigFactory.php(169): Drupal\Core\Config\ConfigFactory->loadOverrides(Array)
#4 /home/liikanjitsu/public_html/lol-liikan/core/lib/Drupal/Core/Config/ConfigFactory.php(104): Drupal\Core\Config\ConfigFactory->doLoadMultiple(Array, true)
#5 /home/liikanjitsu/public_html/lol-liikan/core/lib/Drupal/Core/Config/ConfigFactory.php(89): Drupal\Core\Config\ConfigFactory->doGet('automated_cron....')
#6 /home/liikanjitsu/public_html/lol-liikan/modules/devel/webprofiler/src/Config/ConfigFactoryWrapper.php(22): Drupal\Core\Config\ConfigFactory->get('automated_cron....')
#7 /home/liikanjitsu/public_html/lol-liikan/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(50): Drupal\webprofiler\Config\ConfigFactoryWrapper->get('automated_cron....')
#8 /home/liikanjitsu/public_html/lol-liikan/core/lib/Drupal/Component/DependencyInjection/Container.php(276): Drupal\automated_cron\EventSubscriber\AutomatedCron->__construct(Object(Drupal\Core\ProxyClass\Cron), Object(Drupal\webprofiler\Config\ConfigFactoryWrapper), Object(Drupal\webprofiler\State\StateWrapper))
#9 /home/liikanjitsu/public_html/lol-liikan/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService(Array, 'automated_cron....')
#10 /home/liikanjitsu/public_html/lol-liikan/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(148): Drupal\Component\DependencyInjection\Container->get('automated_cron....')
#11 /home/liikanjitsu/public_html/lol-liikan/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php(245): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->getListeners('kernel.terminat...')
#12 /home/liikanjitsu/public_html/lol-liikan/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php(135): Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->preProcess('kernel.terminat...')
#13 /home/liikanjitsu/public_html/lol-liikan/vendor/symfony/http-kernel/HttpKernel.php(84): Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('kernel.terminat...', Object(Symfony\Component\HttpKernel\Event\PostResponseEvent))
#14 /home/liikanjitsu/public_html/lol-liikan/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): Symfony\Component\HttpKernel\HttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\HttpFoundation\Response))
#15 /home/liikanjitsu/public_html/lol-liikan/core/lib/Drupal/Core/DrupalKernel.php(634): Stack\StackedHttpKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\HttpFoundation\Response))
#16 /home/liikanjitsu/public_html/lol-liikan/index.php(22): Drupal\Core\DrupalKernel->terminate(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\HttpFoundation\Response))
#17 {main}
[10-May-2017 13:03:06 Europe/Helsinki] Exception: The configuration directory type 'override' does not exist in /home/liikanjitsu/public_html/lol-liikan/core/includes/bootstrap.inc on line 163 #0 /home/liikanjitsu/public_html/lol-liikan/modules/config_override/src/SiteConfigOverrides.php(65): config_get_config_directory('override')