[firebird-support] Firebird Crash - version 2.5.6

2016-08-30 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Hi

We are running firebird 2.5.6 and at uneven intervals the service is
crashing with the following log
"C:\Program Files\Firebird\Firebird_2_5\bin\fbserver.exe": terminated
abnormally (4294967295)

It typically happens at night, but not directly related to any scheduled
task. It does run on a virtual server in the cloud, so there could be other
maintenenance services running that we do not see.

The load on the CPU for firbird is fairly high, but I would still not
expect a crash like this.

Typically this happens at least once a week.

Any suggestions on how to progress to find and fix this issue?

-- 
Jardar Maatje
Nortek Data Services AS
Brugata 1
0168 Oslo
tlf: +47 95184034


Re: [firebird-support] Getting INET/inet_error: read errno = 10054

2016-08-27 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Thanks. Very usefull feedback.

27. aug. 2016 8.45 a.m. skrev "Mark Rotteveel m...@lawinegevaar.nl
[firebird-support]" :

>
>
> On 26-8-2016 22:27, Jardar Maatje jardar.maa...@nds.nortek.no
> [firebird-support] wrote:
> > We are running fb 2.5.6 and are getting the INET erorr regularily.
> > The error has been there before as well with earlier versions of fb.
> >
> > Is this something I should be conserned about and what can I do about it?
>
> Error 10054 is "Connection reset by peer", which means that the server
> tried to do something with the network connection from a client, and it
> was already closed. This can happen due to network problems, or the
> application was terminated abruptly. However the usual main cause is
> that connections aren't properly closed, either by your applications (eg
> you never close connections, and they are eventually terminated by the
> garbage collector), or maybe by the driver you use (eg because its
> implementation of a connection close is wrong).
>
> > Another issue is that when I list transactions I have a transaction that
> > is "stuck" back in time but that has no attachemnt associated with it.
> > Is this normal?
> >
> > This is the row from the MON$TRANSACTIONS that have no corresponding
> > MON$ATTACHMENTS row:
> > 648583083 84322 0 26.08.2016, 19:11:47.489 648583083 648563078 649285961
> > 2 -1 1 0 1 26 0023:0004
>
> Assuming the normal order of columns in MON$ATTACHMENTS:
> This is transaction 648583083 of attachment 84322, in state 0 (active),
> it has READ_COMMITTED_VERSION isolation, wait without timeout (AFAIK),
> read-only, no autocommit, with autoundo.
>
> Maybe the associated attachment got terminated abruptly and Firebird
> hasn't yet detected this and rolled back the transaction (or in this
> case as it is read only: committed it). If you want to speed it up: a
> restart of the Firebird server process would mark it as such IIRC.
>
> Mark
> --
> Mark Rotteveel
> 
>


[firebird-support] Getting INET/inet_error: read errno = 10054

2016-08-26 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Hi

We are running fb 2.5.6 and are getting the INET erorr regularily.
The error has been there before as well with earlier versions of fb.

Is this something I should be conserned about and what can I do about it?

Another issue is that when I list transactions I have a transaction that is
"stuck" back in time but that has no attachemnt associated with it. Is this
normal?

This is the row from the MON$TRANSACTIONS that have no corresponding
MON$ATTACHMENTS row:
648583083 84322 0 26.08.2016, 19:11:47.489 648583083 648563078 649285961 2
-1 1 0 1 26 0023:0004


Best regards

Jardar


[firebird-support] Trouble with ADO.Net Provider and connection pool

2016-08-19 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
We are using NHibernate and firebird with C# code.

We have a server application that run 24/7. Our problem is that sometimes
we get an exception from when starting new transaction:
FirebirdSql.Data.FirebirdClient.FbException (0x80004005): Error reading
data from the connection.

We always dispose the nhibernate session. The problem is that it is not
able to recover from this failure unless we set pooling to
false(Pooling=false;). This is of course not desirable.

I see that there is a bug filed for the ADO.net Provider:
http://tracker.firebirdsql.org/browse/DNET-678

Is this the cause, and if so when will this be fixed?

Also is there any good ways to work around this problem?

-- 
Jardar Maatje
Nortek Data Services AS
Brugata 1
0168 Oslo
tlf: +47 95184034


Re: [firebird-support] Gbak restore hangs on "activating and creating deferred indexes"

2016-06-21 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Hi

Normally our restored DB will be 40GB. Is there any reason we would need
significantly more space than this when restoring?

Secondly are there specific bugs in 2.5.4 which could result in this
behaviour? If not I would guess the 2.5.5 would not fix this problem?

Best regards

Jardar

On Wed, Jun 22, 2016 at 6:23 AM, liviuslivius liviusliv...@poczta.onet.pl
[firebird-support]  wrote:

>
>
> hi,
>
> two things
> 1. try latest FB version in part, you have 2.5.4 but there is 2.5.6 or
> newer
> 2. 20 GB is small try to restore this db on normal PC if server have only
> 20GB free.
>
> ps. in FB3 transaction id is int64 - no more problems :)
>
> regards,
> Karol Bieniaszewski
>
>
>  Oryginalna wiadomość 
> Od: "Rune Bjønness rune.bjonn...@nortek-as.com [firebird-support]" <
> firebird-support@yahoogroups.com>
> Data: 22.06.2016 02:03 (GMT+01:00)
> Do: firebird-support@yahoogroups.com
> Temat: [firebird-support] Gbak restore hangs on "activating and creating
> deferred indexes"
>
>
>
> Hi,
>
>
>
> We're trying to do a restore of a 40 GB database (FB 2.5.4 / Win 2008
> Server) because it has reached its transaction limit.
>
> During our first restore attempt it seemed to freeze after having restored
> all records and started activating and creating deferred indexes.
>
> That is, the size of the restored file was not changing for several hours
> and the last entry in the log file from gbak ended in the middle of a
> sentence.
>
>
>
> We lost hope and cancelled the process, which resulted in several more log
> entries of "activating and creating deferred indexes" being written, but we
> got no error messages.
>
> The server had 20 GB of available disk space left when the restore was
> hanging.
>
>
>
> Do you have any suggestions to what the cause of this could be, or how we
> can identify the cause?
>
>
>
>
>
> --Rune Bjønness
>
> 
>



-- 
Jardar Maatje
Nortek Data Services AS
Brugata 1
0168 Oslo
tlf: +47 95184034


[firebird-support] Find rarely used or unused indices

2016-04-08 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Hi

What is the best way to go about to find out about this?

I have several projects that are using the FB database and I would like to
cleanup and remove all the indices that are just taking up space and thus
indirectly reduces performance?

Best regards

jardar


[firebird-support] Restore with -FIX_FSS_D and -FIX_FSS_D -FIX_FSS_M

2015-11-02 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Hi

We have been running a db with FB 2.5.1 (SDO 11.2) and made a backup and
want to restore it for FB 2.5.4. Should I use the
-FIX_FSS_M and -FIX_FSS_D
options?

Is there any reason why I should not use these options (to be on the safe
side?)

-- 
Jardar Maatje
Nortek Data Services AS
C.J. Hambros Plass 2C
0164 Oslo
tlf: +47 95184034


Re: [firebird-support] High CPU use after restore

2015-10-31 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Hi

First of all thanks for help on the way. After a lot of work (and waiting
for restore,backups indexing...) I found out that it actually was as simple
as an index that was inactive. The index must have been disabled during my
first backup/restore as I am sure I did not do this myself.
The index was a normal foreign key. However the table included a blob
column.

Anyone that has an idea why this was disable during backup/restore?

Anyway one the results of this is that I know both have better
understanding of firebird and also have better tools for dealing with
situations where I need to take down the database.

Best regards

Jardar

On Thu, Oct 29, 2015 at 11:03 AM, Helen Borrie hele...@iinet.net.au
[firebird-support]  wrote:

>
>
> Hello Jardar,
>
> Thursday, October 29, 2015, 9:55:20 PM, you wrote:
>
>
>
>
> The comment about "at least rebuild indexes" does that mean that I can
> expect this to work or do I risk that I still need to backup/restore?
>
> A  restore will rebuild all of the indexes.
> However, the indexes affected by the v.2.5.1 bug are those that are
> compound, i.e., multi-column, so they are the only ones you need to
> rebuild.  A backup/restore will not be required.
>
> If you have multi-column primary, foreign or unique key constraints, note
> that ALTER INDEX  INACTIVE will not work on a constraint index;
>  but ALTER INDEX  ACTIVE will rebuild those anyway.
>
> Do I need to say, do this job whilst you have exclusive access as an
> administrator of the database or as the owner of the affected tables.
>
> Helen
>
> 
>



-- 
Jardar Maatje
Nortek Data Services AS
C.J. Hambros Plass 2C
0164 Oslo
tlf: +47 95184034


Re: [firebird-support] High CPU use after restore

2015-10-29 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Hi again

The comment about "at least rebuild indexes" does that mean that I can
expect this to work or do I risk that I still need to backup/restore?

Best regards

jardar

On Thu, Oct 29, 2015 at 9:52 AM, Mark Rotteveel m...@lawinegevaar.nl
[firebird-support]  wrote:

>
>
> On Thu, 29 Oct 2015 07:43:29 +0100, "Jardar Maatje
> jardar.maa...@nds.nortek.no [firebird-support]"
>  wrote:
> > Hi again,
> >
> > Sounds like a reasonable cause for the problem. So now is my question,
> what
> > is the best way to upgrade.
> > My current setup is as follows:
> > I have two databases, one for raw data (RAW), and the second one for
> > decoded data (MAIN). I need to keep the RAW db with as high availability
> as
> > possible (or we will loose incoming data). For the MAIN db I have more
> > slack regarding downtime (weekends/nights). They both have ODS version
> > 11.2.
> >
> > The best would be if I could upgrade to the latest version (2.5.4) of
> the
> > server db without the need to do backup/restore as this takes a lot of
> > time.
>
> You will need to backup and restore or at least rebuild the indexes, see
> the release notes for 2.5.3:
>
> http://www.firebirdsql.org/file/documentation/release_notes/html/rlsnotes254.html#notes-253
>
> Mark
> 
>



-- 
Jardar Maatje
Nortek Data Services AS
C.J. Hambros Plass 2C
0164 Oslo
tlf: +47 95184034


Re: [firebird-support] High CPU use after restore

2015-10-28 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Hi again,

Sounds like a reasonable cause for the problem. So now is my question, what
is the best way to upgrade.
My current setup is as follows:
I have two databases, one for raw data (RAW), and the second one for
decoded data (MAIN). I need to keep the RAW db with as high availability as
possible (or we will loose incoming data). For the MAIN db I have more
slack regarding downtime (weekends/nights). They both have ODS version 11.2.

The best would be if I could upgrade to the latest version (2.5.4) of the
server db without the need to do backup/restore as this takes a lot of time.

Best regards

Jardar
29. okt. 2015 00.00 skrev "setysvar setys...@gmail.com [firebird-support]" <
firebird-support@yahoogroups.com>:

>
>
>
> Den 28.10.2015 20:56, skrev Jardar Maatje jardar.maa...@nds.nortek.no
> [firebird-support]:
>
> Hi again
>
> A bit more details. I found the query the slows this down and it is a
> query that includes blob data. If I adjust the query to cast the blob to
> varchar first the query executes 30 timers faster. I will try to change my
> queries to fix this.
>
> However I still wonder why this suddenly became a problem after restoring
> the database.
>
> Best regards
>
> Jardar
>
> http://tracker.firebirdsql.org/browse/CORE-4601 is a report of a 60-time
> improvement (from half a minute to half a second) with Firebird 2.5.2/2.5.3
> and Jaybird 2.2.5/2.1.6 when changing from blob to varchar, I guess this
> could be the same problem as you observe.
>
> Could it be that your original database had never before been restored
> with Firebird 2.5.1, but only with an older Firebird/InterBase version (or
> never restored, but created with an older Firebird/InterBase version)? If
> so, then you may have been protected against this particular bug (I'm just
> guessing, I don't know if older versions have it or not), as well as the
> bug (only existing in 2.5.1, 2.5.0 and 2.5.2 are OK) that I warned about
> earlier today regarding indexes containing more than one field (which - I
> think - can give you wrong results from some queries).
>
> Set
>
> 
>


Re: [firebird-support] High CPU use after restore

2015-10-28 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Hi again

A bit more details. I found the query the slows this down and it is a query
that includes blob data. If I adjust the query to cast the blob to varchar
first the query executes 30 timers faster. I will try to change my queries
to fix this.

However I still wonder why this suddenly became a problem after restoring
the database.

Best regards

Jardar

On Wed, Oct 28, 2015 at 7:39 PM, Jardar Maatje 
wrote:

> Hi again
>
> Thanks for the feedback. I will try and investigate further based on your
> feedback. So far I have updated the index statistics and the seems to make
> minor improvements. I thought the indexes was recreated (and thus the
> statistics) when it was restored.
>
> Regarding the .GDB i doubt this as the filename of the db is exactly the
> same as before.
>
> When restoring I just used the default restore options, no special options
> selected.
>
> Will keep you posted on the status (and probably ask more questions when I
> fail to sole this).
>
> At the same time I have another question. The database is used for
> collecting data and there almost no deletes/updates to the DB. And the
> webpage is only retreiving data from it and not manipulating the content.
> Is there a way to prevent the transaction ID's to increment for the
> readonly requests?
>
> best regards
>
> Jardar
>
>
>
> On Wed, Oct 28, 2015 at 6:43 PM, setysvar setys...@gmail.com
> [firebird-support]  wrote:
>
>>
>>
>> Hei Jardar, I have never even heard of Nortek before!
>>
>> >We have DB of about 40GB where transaction counter exceeded max and we
>> had to backup and restore to get the db back up an running.
>> >However after doing this we have had trouble where the DB consumes 25%
>> CPU (100% on one core). This typically happens when accessing
>> >the DB from IIS web pages with quite a bit of transactions. However
>> normally this work very fine without this 100% CPU core load.
>> >
>> >I find it hard to detect the real cause of the problem and also
>> surprised that this should happen after a restore.
>> >One thing to mention that after the restore I had to recreate store
>> procedures and trigger. From documentation on web I got the
>> >impression that this was caused by a encoding issue of text.
>>
>> Did you modify the procedures/triggers at all? Recent changes would be
>> suspicious, and I agree that a restore being the cause doesn't make much
>> sense. And how did you restore your database? There ought to be some
>> free space on each page when restoring, I hope you didn't use the
>> -USE_ALL_SPACE option (unless the database is read-only). Has anything
>> else changed with the restore, e.g. the sweep interval (I don't know
>> where the sweep interval is stored, just that gfix can set it)? And are
>> there any queries being held open for a prolonged period that didn't
>> exist before?
>>
>> >Another thing to mention is that we are running the DB on Win 2008
>> Server and the fb version is 2.5.1. We also have the .GDB extension
>> >on the database, but since this has not been a trouble before, I doubt
>> that this is the problem.
>>
>> GDB can matter since it is (or was?) monitored by Windows
>> (https://msdn.microsoft.com/en-us/library/aa378870(VS.85).aspx), making
>> Windows make a backup of the file when connecting. However, it is a long
>> time since I last heard of someone having an issue with this, and have
>> no clue whether or not it is still of importance with Win 2008.
>> Moreover, I presume you just restored the database, not reinstall Windows.
>>
>> 2.5.1 might or might not be OK, since it contains a bug regarding
>> multi-field indexes. Here's what I found in the release notes for 2.5.2
>>
>> "Warning re Databases Created or Restored under Firebird 2.5.1
>> All users upgrading from Firebird 2.5.1 to a higher sub-release are
>> strongly advised to migrate databases using gbak backup/restore. If this
>> is impracticable, at least rebuild all compound indices in the databases
>> being migrated.
>> Databases being upgraded from older Firebird versions (ODS 11.1 and
>> lower) or v.2.5.0 are not affected by this regression."
>>
>> We (Kreftregisteret) also use Fb 2.5.1 (or used, I wonder if we upgraded
>> to 2.5.3 or 2.5.4 a while ago), but we almost exclusively use single
>> field indexes and has never had serious problems caused by the bug (I
>> think I experienced duplicates with SELECT , ,
>> COUNT(*) FROM  GROUP BY 1, 2 due to this bug when we had a
>> combined index on FieldName1 and FieldName2 and one of the fields were
>> , but am far from certain this bug was the culprit).
>>
>> >What I have done so far is to:
>> >* validate the db
>> >* run manual sweep on it
>> >* restarted fbserver
>> >* restarted server
>> >* restarted IIS
>> >
>> >Right now I am starting each of the websites/services that are
>> accessing the DB.
>> >
>> >Any suggestions on how t
>> >feel like I am just guessing about the cause and applying different
>> potential fixes at "random".
>>
>> One "problem" with Firebird, is that on

Re: [firebird-support] High CPU use after restore

2015-10-28 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Hi again

Thanks for the feedback. I will try and investigate further based on your
feedback. So far I have updated the index statistics and the seems to make
minor improvements. I thought the indexes was recreated (and thus the
statistics) when it was restored.

Regarding the .GDB i doubt this as the filename of the db is exactly the
same as before.

When restoring I just used the default restore options, no special options
selected.

Will keep you posted on the status (and probably ask more questions when I
fail to sole this).

At the same time I have another question. The database is used for
collecting data and there almost no deletes/updates to the DB. And the
webpage is only retreiving data from it and not manipulating the content.
Is there a way to prevent the transaction ID's to increment for the
readonly requests?

best regards

Jardar



On Wed, Oct 28, 2015 at 6:43 PM, setysvar setys...@gmail.com
[firebird-support]  wrote:

>
>
> Hei Jardar, I have never even heard of Nortek before!
>
> >We have DB of about 40GB where transaction counter exceeded max and we
> had to backup and restore to get the db back up an running.
> >However after doing this we have had trouble where the DB consumes 25%
> CPU (100% on one core). This typically happens when accessing
> >the DB from IIS web pages with quite a bit of transactions. However
> normally this work very fine without this 100% CPU core load.
> >
> >I find it hard to detect the real cause of the problem and also
> surprised that this should happen after a restore.
> >One thing to mention that after the restore I had to recreate store
> procedures and trigger. From documentation on web I got the
> >impression that this was caused by a encoding issue of text.
>
> Did you modify the procedures/triggers at all? Recent changes would be
> suspicious, and I agree that a restore being the cause doesn't make much
> sense. And how did you restore your database? There ought to be some
> free space on each page when restoring, I hope you didn't use the
> -USE_ALL_SPACE option (unless the database is read-only). Has anything
> else changed with the restore, e.g. the sweep interval (I don't know
> where the sweep interval is stored, just that gfix can set it)? And are
> there any queries being held open for a prolonged period that didn't
> exist before?
>
> >Another thing to mention is that we are running the DB on Win 2008
> Server and the fb version is 2.5.1. We also have the .GDB extension
> >on the database, but since this has not been a trouble before, I doubt
> that this is the problem.
>
> GDB can matter since it is (or was?) monitored by Windows
> (https://msdn.microsoft.com/en-us/library/aa378870(VS.85).aspx), making
> Windows make a backup of the file when connecting. However, it is a long
> time since I last heard of someone having an issue with this, and have
> no clue whether or not it is still of importance with Win 2008.
> Moreover, I presume you just restored the database, not reinstall Windows.
>
> 2.5.1 might or might not be OK, since it contains a bug regarding
> multi-field indexes. Here's what I found in the release notes for 2.5.2
>
> "Warning re Databases Created or Restored under Firebird 2.5.1
> All users upgrading from Firebird 2.5.1 to a higher sub-release are
> strongly advised to migrate databases using gbak backup/restore. If this
> is impracticable, at least rebuild all compound indices in the databases
> being migrated.
> Databases being upgraded from older Firebird versions (ODS 11.1 and
> lower) or v.2.5.0 are not affected by this regression."
>
> We (Kreftregisteret) also use Fb 2.5.1 (or used, I wonder if we upgraded
> to 2.5.3 or 2.5.4 a while ago), but we almost exclusively use single
> field indexes and has never had serious problems caused by the bug (I
> think I experienced duplicates with SELECT , ,
> COUNT(*) FROM  GROUP BY 1, 2 due to this bug when we had a
> combined index on FieldName1 and FieldName2 and one of the fields were
> , but am far from certain this bug was the culprit).
>
> >What I have done so far is to:
> >* validate the db
> >* run manual sweep on it
> >* restarted fbserver
> >* restarted server
> >* restarted IIS
> >
> >Right now I am starting each of the websites/services that are
> accessing the DB.
> >
> >Any suggestions on how t
> >feel like I am just guessing about the cause and applying different
> potential fixes at "random".
>
> One "problem" with Firebird, is that one or two (very) bad queries can
> be enough make everything come to a halt. However, this would only be
> another random guess. What I would recommend you to try though, is to
> run a query similar to SELECT * FROM MON$STATEMENTS WHERE MON$TIMESTAMP
> IS NOT NULL ORDER BY MON$TIMESTAMP when things are slow. This could(*)
> give you the queries currently running on the server and then you could
> take the queries that ran when the problem manifested itself, prepare
> them and see if the generated PLAN seems sensible or not. If you don't

[firebird-support] High CPU use after restore

2015-10-27 Thread Jardar Maatje jardar.maa...@nds.nortek.no [firebird-support]
Hi


We have DB of about 40GB where transaction counter exceeded max and we had
to backup and restore to get the db back up an running. However after doing
this we have had trouble where the DB consumes 25% CPU (100% on one core).
This typically happens when accessing the DB from IIS web pages with quite
a bit of transactions. However normally this work very fine without this
100% CPU core load.


I find it hard to detect the real cause of the problem and also surprised
that this should happen after a restore.


One thing to mention that after the restore I had to recreate store
procedures and trigger. From documentation on web I got the impression that
this was caused by a encoding issue of text.


Another thing to mention is that we are running the DB on Win 2008 Server
and the fb version is 2.5.1. We also have the .GDB extension on the
database, but since this has not been a trouble before, I doubt that this
is the problem.


What I have done so far is to:
* validate the db
* run manual sweep on it
* restarted fbserver
* restarted server
* restarted IIS


Right now I am starting each of the websites/services that are accessing
the DB.


Any suggestions on how to proceed? I am also interested in understanding
better how I can better debug these situations. Right now I feel like I am
just guessing about the cause and applying different potential fixes at
"random".


-- 
Jardar Maatje
Nortek Data Services AS
C.J. Hambros Plass 2C
0164 Oslo
tlf: +47 95184034