Terraform: Resource not found

Here’s a few things I learned and did when I encountered the very verbose “Resource not found” error from Terraform. Debug your Infrastructure as Code More logs? This is my obvious choice or go-to. Terraform comes with different log levels though it will say itself that every level but TRACE is not to be trusted? 2021/03/02 09:21:33 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility....

March 2, 2021 · 3 min

Tracking PHP errors

track_errors provides the means to catch an error message emitted from PHP. It’s something I like to use during the development of various applications, or to get a handle on legacy code. Here are a few examples why! For example Imagine the following remote HTTP call: So whenever this call fails, it will return false and also emit an error message: Some people use @ to suppress this error message — an absolute no-go for reasons such as:...

November 27, 2010 · 2 min

Debugging Zend_Test

Sometimes, I have to debug unit tests and usually this is a situation I’m trying to avoid. If I have to spend too much time debugging a test it’s usually a bad test. Which usually means that it’s too complex. However, with Zend_Test_PHPUnit_ControllerTestCase, it’s often not the actual test, but the framework. This is not just tedious for myself, it’s also not the most supportive fact when I ask my developers to write tests....

September 20, 2010 · 3 min

PHP, APC and sessions

Playing with redis/Rediska and sessions, I wanted to get more numbers to compare this solution to a traditional MySQL-based approach which also made me revisit the idea of a CouchDB-based session handler for Zend_Session. Implementing this handler, I ran into a weird issue: Fatal error: Undefined class constant 'ALLOW_ALL' in /usr/home/till/foo/trunk/library/Zend/Uri/Http.php on line 447 Call Stack # Time Memory Function Location 1 0.7357 3914816 Foo_Session_SaveHandler_Couchdb->write( ) ../Couchdb.php:0 2 0.7358 3916600 Foo_Couchdb->query( ) ....

May 26, 2010 · 3 min

Operating CouchDB

These are some random operational things I learned about CouchDB. While I realize that my primary use-case (a CouchDB install with currently 230+ million documents) may be oversized for many, these are still things important things to know and to consider. And I would have loved to know of some of these before we grew that large. I hope these findings are useful for others. Compaction CouchDB doesn’t take great care of diskspace — the assumption is that disk is cheap....

May 8, 2010 · 7 min