Developer Portal with PostgreSQL - database error

Not applicable

Hello All,

We are using PostgreSQL with Developer Portal and seeing this error pop up a lot when deleting or modifying any setting.

An example is when we try to edit a method in Smartdocs and hit Save we get an error on the screen that says - The website encountered an error when processing the request. However, the Model is updated successfully. Also, another example is when trying to delete a Content, seeing the same behavior.

The error in the logs look like this -

PDOException: SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block: DELETE FROM {taxonomy_index} WHERE (nid = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 75 ) in taxonomy_delete_node_index() (line 2011 of /var/www/html/.../modules/taxonomy/taxonomy.module).

How can we fix this?

Thanks

0 1 434
1 REPLY 1

@Srinath,

Check the pgsql database logs directly, there might be more of a clue in there. This type of error can be hard to track down, but generally indicates a lock conflict, duplicate index key, or race condition.

From https://stackoverflow.com/questions/10399727/psqlexception-current-transaction-is-aborted-commands-i...

The reason you get this error is because you have entered a transaction and one of your SQL Queries failed, and you gobbled up that failure and ignored it. But that wasn't enough, THEN you used that same connection, using the SAME TRANSACTION to run another query. The exception gets thrown on the second, correctly formed query because you are using a broken transaction to do additional work. Postgresql by default stops you from doing this.