[ic] Order Numbers and NFS
Kevin Walsh
kevin at cursor.biz
Fri Feb 24 08:55:55 EST 2006
Sandy Thomson <sandy at scotwebshops.com> wrote:
> I have been having issues with clustering interchange and using the
> default order counters.
>
> Now it all works pretty well with file based sessions at the moment -
> until the early morning cron job that expires old sessions kicks in on
> the NFS master (and the NFS slave has to 'catch up'). Any changes to the
> order counter file get queued up with all the other writes, and there is
> the problem of the order counter getting out of sync. It has happened
> before, we have had a few duplicate orders but there was no way to pin
> down the exact cause of the problem (I always suspected this though).
> Anyway last night over the space of 2 hours we had 6 orders assigned to
> 3 order numbers.
>
> The solution I would like to use is database sequences. I have been
> trawling through the documentation/mailing lists for a few hours, have
> tried making my own UserTags and referencing them in the CounterFile
> directive, have also tried setting $Value->{mv_order_number} in
> etc/log_transation to no avail.
>
> I also noticed the [counter] tag has sql options for sequences, so im
> guessing the work for this must already be done?
> Any hints?
>
Please check that you have set the following configuration directives
to make use of fcntl, instead of the default flock, when locking files
exported over NFS:
In interchange.cfg:
LockType fcntl
In catalog.cfg:
SessionType NFS
Locking problems would only occur when there are multiple simultaneous
attempts to access a file, of course. You said that you had six orders
over two hours, and three order numbers. It seems a bit of a coincidence
to get simultaneous writes to the order counter file during that time,
but not impossible, so you should check the order times to verify whether
this is a locking issue or something else. Raising some test orders
will help track the problem, if it's not lock-related.
If you'd prefer to use SQL counters, with the [counter] tag, then
you will find some documentation in section 4.16.2.4 of the
Interchange Tags Reference, here:
http://www.interchange.rtfm.info/docs/rtfm_ictags.html
Also, in your main Route, you can use SQL order counters by setting
the "sql_counter" key. The specified value would be passed to the
same subroutine that looks after the [counter] tag, so the same
syntax listed in the above [counter] documentation will apply.
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin at cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/
More information about the interchange-users
mailing list